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

Advanced configuration doesn't work #60

Open
SamMousa opened this issue Dec 1, 2022 · 1 comment
Open

Advanced configuration doesn't work #60

SamMousa opened this issue Dec 1, 2022 · 1 comment

Comments

@SamMousa
Copy link

SamMousa commented Dec 1, 2022

It seems advanced configuration is not easy to get going.
According to PHPstan docs you shouldn't use extension installer when not wanting all rules of an extension.
I tried both with and without.

What I think is happening is that the list of banned nodes from the extension config is merged with the list specified in my project config. (Similar to how ignoreErrors is merged from the baseline file and project config).

This means that removing an item because I don't care about echo usage is not possible.

A workaround is to ignore the specific error manually, but doesn't feel very clean.

@donatj
Copy link

donatj commented Sep 13, 2024

Same problem - I have just as follows, but it's still barking about every single echo in my codebase

	banned_code:
		nodes:
			# enable detection of a set of functions
			-
				type: Expr_FuncCall
				functions:
					- drop
					- see
					- print_r

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

No branches or pull requests

2 participants