Ignoring check #3902
Replies: 5 comments 5 replies
-
@todo-username You can use Without more detailed information about what you are trying to ignore, I can't give more specific examples. Also see: |
Beta Was this translation helpful? Give feedback.
-
I need to ignore lines starting with "use FolderName/..." and "namespace FolerName/..." as they may exceed the 120 character limit and cannot be split across multiple lines. It is also impossible to reduce the level of nesting of directories (a project feature). I know that I can ignore lines using comment blocks, but I need to keep all these restrictions inside the config, since the config is easier to manage and can only be edited after approval. Adding an entire file or directory is also not the best solution, since the only problems are with the 'use' and 'namespace' blocks. |
Beta Was this translation helpful? Give feedback.
-
If I could ignore the substring search line of code - that would solve my problem. |
Beta Was this translation helpful? Give feedback.
-
It would be possible to put this in the config as in phpstan - this would solve the problem |
Beta Was this translation helpful? Give feedback.
-
@todo-username That does not sound like a Q&A question, but a complaint/feature request. Having said that, I'm not sure the sniff should be adjusted. It's a users choice to use the sniff and enforce the line length limit in the first place. Secondly, the desired max line length is configurable. |
Beta Was this translation helpful? Give feedback.
-
How can I add an exception to a file for substring checking or exclude use or namespace checking?
For example, is "use Service/Folder1/Folder2/..." more than 120 characters?
Beta Was this translation helpful? Give feedback.
All reactions