-
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
Ignore MOODLE_INTERNAL sniff for all Behat classes. #157
Comments
stronk7
added a commit
to stronk7/moodle-local_codechecker
that referenced
this issue
Nov 8, 2021
Previously it was simply skipping any file straight under a "behat" directory. So, at very least these 2 cases were being handled incorrectly: 1. Subdirectories under "behat" were not skipped. 2. admin/behat directory was being incorrectly skipped. Now, being able to calculate moodle root, we are going to skip: 1. Any file within dirroot having "/tests/behat" in the path. 2. Any file within dirroot having "/lib/behat" in the path. 3. Any file within dirroot having "/lang/" in the path. With thatm the 2 original problems should be fixed. Covered. Fixes moodlehq#157.
stronk7
added a commit
to stronk7/moodle-local_codechecker
that referenced
this issue
Nov 8, 2021
Previously it was simply skipping any file straight under a "behat" directory. So, at very least these 2 cases were being handled incorrectly: 1. Subdirectories under "behat" were not skipped. 2. admin/behat directory was being incorrectly skipped. Now, being able to calculate moodle root, we are going to skip: 1. Any file within dirroot having "/tests/behat/" in the path. 2. Any file within dirroot having "/lib/behat/" in the path. 3. Any file within dirroot having "/lang/" in the path. With that the 2 original problems should be fixed. Covered with unit tests. Fixes moodlehq#157.
stronk7
added a commit
that referenced
this issue
Nov 9, 2021
Previously it was simply skipping any file straight under a "behat" directory. So, at very least these 2 cases were being handled incorrectly: 1. Subdirectories under "behat" were not skipped. 2. admin/behat directory was being incorrectly skipped. Now, being able to calculate moodle root, we are going to skip: 1. Any file within dirroot having "/tests/behat/" in the path. 2. Any file within dirroot having "/lib/behat/" in the path. 3. Any file within dirroot having "/lang/" in the path. With that the 2 original problems should be fixed. Covered with unit tests. Fixes #157.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mentioned by @stronk7 - we should check whether the file contains a
/behat/
folder in it's path, rather than it's immediate descendant having that name:moodle-local_codechecker/moodle/Sniffs/Files/MoodleInternalSniff.php
Lines 50 to 53 in 5f4cf15
See MDL-72696 (fails for file
lib/behat/form_field/behat_form_inplaceeditable_select.php
)The text was updated successfully, but these errors were encountered: