Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkValidAnalyzedProjectDirectory vs --config-file #64

Open
anibalsanchez opened this issue Jul 19, 2019 · 5 comments
Open

checkValidAnalyzedProjectDirectory vs --config-file #64

anibalsanchez opened this issue Jul 19, 2019 · 5 comments

Comments

@anibalsanchez
Copy link

Hi,

The extension checks if there is a config file in the defined phan.analyzedProjectDirectory (function checkValidAnalyzedProjectDirectory).

Phan supports the CLI argument -k/--config-file parameter to use an external config file. This option does not work in the extension and it is being ignored by the checkValidAnalyzedProjectDirectory validation.

Thanks, great extension!

@anibalsanchez
Copy link
Author

For instance, you can trick vscode-php-phan with an empty .phan/config.php file to load the external config.php.

@TysonAndre
Copy link
Owner

TysonAndre commented Jul 19, 2019

analyzedProjectDirectory supports an array of one or more project directories, so they can't all use the same --config-file. Adding --config-file works for a single project, but not for multiple projects.

So my plan to solve this would be "analyzedProjectDirectory": ['/path/to/project1', {"dir": "/path/to/project2", "configFile": "/path/to/project2/alternate/phan_config.php"}] - support either strings or complex configs for the project directories (and document supported options).

@anibalsanchez
Copy link
Author

The simplest solution would be a way to disable the checkValidAnalyzedProjectDirectory validation.

"analyzedProjectDirectory" as an array is a nice feature. But in my case, I have the projects separated in its own space (not integrated into a VSCode workspace). So, I don't use it.

Ideally, if analyzedProjectDirectory is an array, each project could have its own set of arguments.

@TysonAndre
Copy link
Owner

The simplest solution would be a way to disable the checkValidAnalyzedProjectDirectory validation.

I could add an option to allow that (off by default)

@anibalsanchez
Copy link
Author

Cool. Great addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants