Skip to content
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

Apply more accurate dispensations for the Moodle internal checks #158

Merged

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented 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 #157.

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 stronk7 merged commit db1cd44 into moodlehq:master Nov 9, 2021
@stronk7
Copy link
Member Author

stronk7 commented Nov 9, 2021

Self-merged

@stronk7 stronk7 deleted the better_moodle_internal_dispensations branch November 9, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore MOODLE_INTERNAL sniff for all Behat classes.
1 participant