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

Allow to change phpstan rule level #28

Open
akuzia opened this issue Jan 10, 2019 · 6 comments
Open

Allow to change phpstan rule level #28

akuzia opened this issue Jan 10, 2019 · 6 comments
Labels

Comments

@akuzia
Copy link

akuzia commented Jan 10, 2019

Is it possible to analyse codebase with stan using --level argument? In many other editor extensions there is such option, but this awesome ls lacks it.

@tsufeki
Copy link
Owner

tsufeki commented Jan 13, 2019

I've personally never feel the need for it (IDE is not like CI as there's no binary result, and marking any suspicious may be useful) but I see how this can be distracting - I'll put it in the next iteration.

@tsufeki tsufeki added the todo label Jan 13, 2019
@crissi
Copy link

crissi commented Sep 6, 2019

what about config files for phpstan, it does not seem to pick up my config: phpstan.neon, but I might be mistaking

@tsufeki
Copy link
Owner

tsufeki commented Sep 16, 2019

Indeed, phpstan.neon is ignored, and for good reasons:

  1. Versions of phpstan used in your project and bundled in LS may be different, making config file wrong/useless.
  2. I can't include extensions "as is" - many of them rely on global state or actually load analysed code, and are therefore impossible to use in a long running process.

Phpstan levels are pretty stable in general so it may be useful to pick them from phpstan.neon, but nothing more is viable.

@crissi
Copy link

crissi commented Sep 16, 2019

That is unfortunate, since I am using Laravel. I also use the config from https://github.com/nunomaduro/ with phpstan vs code plugin to better match Laravel logic, but since your plugin support phpstan + other awesomeness, it would make sense me to only use that instead of phpstan vs code plugin. But right now I get way too many errors with your plugin because the neon file is not supported.

@akuzia
Copy link
Author

akuzia commented Nov 7, 2019

@tsufeki ignoreErrors and excludes_analyse are pretty viable options, in my opinion.

@yazeed
Copy link

yazeed commented Dec 29, 2019

I agree with @crissi, your plugin would be awesome if it supported Larastan (https://github.com/nunomaduro/larastan). Maybe it's a good idea to open a separate issue for it?

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

No branches or pull requests

4 participants