-
Notifications
You must be signed in to change notification settings - Fork 72
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
Make the sniff to also detect unexpected MOODLE_INTERNAL checks #169
Make the sniff to also detect unexpected MOODLE_INTERNAL checks #169
Conversation
674bc6e
to
4768f96
Compare
Here there are the results of the Sniff against complete (master) codebase: https://gist.github.com/stronk7/162e4b652490e02d66164606edb00864 9604 errors and 500 warnings. Ciao :-) |
You have included the vendor directory, Eloy. |
Until now, the Sniff was only finding missing MOODLE_INTERNAL checks (when the file has side effects OR multiple artifacts). Now, when the check exists and the file does not have side effects or multiple artifacts, a new MoodleInternalNotNeeded is thrown. Also, when the old MOODLE_INTERNAL check is detected, a new MoodleInternalOld warning is thrown. Covered with tests. Finally, all the tests related with this Sniff have been moved to a different test case and all the fixtures moved to new subdirectory. Part of plans to split the tests completely, with each sniff having its own testcase. Fixes moodlehq#152
4768f96
to
2b019ce
Compare
Yeah, and all third-party libs and others. Not critical. Neither the numbers are important or are going to be fixes in bulk. Still there are a lot. Thanks! |
did this one really need to be an "error" state? I'm seeing this error in some pull requests this week on 3rd party plugins, and it doesn't really feel that important.. maybe it could have been a warning and then upgraded to an error at a later date? |
Hi @danmarsden, HTH, |
cool thanks - should have checked existing issues! :-) |
Until now, the Sniff was only finding missing MOODLE_INTERNAL checks
(when the file has side effects OR multiple artifacts).
Now, when the check exists and the file does not have side effects
or multiple artifacts, a new MoodleInternalNotNeeded is thrown.
Also, when the old MOODLE_INTERNAL check is detected, a new
MoodleInternalOld warning is thrown.
Covered with tests.
Finally, all the tests related with this Sniff have been moved
to a different test case and all the fixtures moved to new
subdirectory. Part of plans to split the tests completely, with
each sniff having its own testcase.
Fixes #152