Enable only one rule for validation #4406
Answered
by
ondrejmirtes
TBlindaruk
asked this question in
Support
Replies: 4 comments
-
Hi, like this: parameters:
customRulesetUsed: true
services:
-
class: PHPStan\Rules\DeadCode\UnusedPrivatePropertyRule
arguments:
alwaysWrittenTags: true
alwaysReadTags: true
checkUninitializedProperties: true
tags:
- phpstan.rules.rule
The version with |
Beta Was this translation helpful? Give feedback.
0 replies
-
With this configuration I have also got errors from other rules...
I need to get errror only from the UnusedPrivatePropertyRule( |
Beta Was this translation helpful? Give feedback.
0 replies
-
There might be two reasons for that:
* You’re still passing a level on the command line. Don’t do that.
* The error comes from analysing stubFiles which isn’t optional.
If it’s neither of these two cases, please create a small reproducing
repository that shows the problem.
On Thu 21. 1. 2021 at 9:49, Tetiana Blindaruk ***@***.***> wrote:
With this configuration I have also got errors from other rules...
for example:
- MissingFunctionParameterTypehintRule from this rule got has
parameter $parameterName with no value type specified in iterable
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4406 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZTOAVFRO27LJBMUDKMMTS27S75ANCNFSM4WLW47IA>
.
--
Ondřej Mirtes
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TBlindaruk
-
Thnaks ;) error level was in the config |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have try to enable ony one rule: - UnusedPrivatePropertyRule
But I do not know how I can do it.
Could you help me?)
I have tried to do something like
but looks like it is not the right way ;)
Beta Was this translation helpful? Give feedback.
All reactions