You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NotContainDocBlockLike matches not related classes #363
Hi @Maxell92,
thank you for reporting this 🙇
We could probably make NotContainDocBlockLike accepting wildcards as for the rules that match class name or namespaces. What do you think @fain182@AlessandroMinoccheri?
@micheleorselli it makes sense...
So you would break backward compatiblity and transform NotContainDocBlockLike in an exact match when there are no wildcard?
Just brainstorming. Maybe it can be useful to add a specif rule for Exceptions. The rule ->should(new NotContainDocBlockLike('@throws Exception')) does not work well if the same Exception is used with a relative namespace (E.g. @throws Exception) or with the complete namespace (E.g. @throws \Exception)
Activity
micheleorselli commentedon Feb 26, 2023
Hi @Maxell92,
thank you for reporting this 🙇
We could probably make
NotContainDocBlockLikeaccepting wildcards as for the rules that match class name or namespaces. What do you think @fain182 @AlessandroMinoccheri?AlessandroMinoccheri commentedon Feb 26, 2023
Yes, it could be useful to accept wildcards!
fain182 commentedon Feb 27, 2023
@micheleorselli it makes sense...
So you would break backward compatiblity and transform
NotContainDocBlockLikein an exact match when there are no wildcard?micheleorselli commentedon Feb 27, 2023
Or we could add a new
NotContainDocBlockand deprecate the usage ofNotContainDocBlockLikeAlessandroMinoccheri commentedon Feb 28, 2023
I prefer to add a new
NotContainDocBlockrule.LuigiCardamone commentedon Mar 2, 2023
Just brainstorming. Maybe it can be useful to add a specif rule for Exceptions. The rule
->should(new NotContainDocBlockLike('@throws Exception'))does not work well if the same Exception is used with a relative namespace (E.g.@throws Exception) or with the complete namespace (E.g.@throws \Exception)micheleorselli commentedon Mar 2, 2023
I think I get what you mean... we should probably look into
@throwstags during the analysis and treat them as dependenciesThat said, a
NotContainDocBlockcould still be useful