-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Fix: Match files_sub_directory
as a prefix
#1765
Fix: Match files_sub_directory
as a prefix
#1765
Conversation
4538f1b
to
fb6ff05
Compare
it seems it does not work with some test classes using files_sub_directory... Maybe something to play with workspace MegaLinter object attribute ? |
I'm trying to find an easy way to run a subset of tests locally. Any hints? |
Instructions are here :) https://oxsecurity.github.io/megalinter/latest/contributing/ To locally run test classes and debug with breakpoints , you can use VsCode extension Test Explorer If you use PyCharm it is native |
I've seen the doc before and it was saying that I had to trigger a pipeline in any case to build a container. The only thing I could do (according to the docs) is limiting what to build (quick build) and what to test but I'd have to wait an approval every time and then the time to be built and be tested. I'll try vscode or pycharm. |
@giner the pipeline is indeed mandatory, but you can locally run without the docker image if you have installed the linter globally in your computer |
fb6ff05
to
7d01b6a
Compare
I think you must solve conflicts before I can accept the CI jobs ^^ |
7d01b6a
to
6e181e7
Compare
Properly match `files_sub_directory` as a prefix instead of partial string matching. Before - If directory named "files_sub_directory" exists then all files matching "files_sub_directory" are selected. For example if files_sub_directory is set to "dir" and dir exists under the workspace directory then "mode/direct/file.yml" and "new_directory/f.yml" will be selected After - If directory named "files_sub_directory" exists then all files which names start with "files_sub_directory" are selected. For example if files_sub_directory is set to "dir" (or "./dir" or "dir/" or "./dir/") and dir exists under the workspace directory then "dir/file.yml" will be selected but not "new_directory/f.yml" and not "some/dir/f.yml"
6e181e7
to
e3666a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks a lot for your contribution :)
Proposed Changes
Properly match
files_sub_directory
as a prefix instead of partial string matching.Before
matching "files_sub_directory" are selected. For example if
files_sub_directory is set to "dir" and dir exists under the workspace
directory then "mode/direct/file.yml" and "new_directory/f.yml" will
be selected
After
which names start with "files_sub_directory" are selected. For example if
files_sub_directory is set to "dir" (or "./dir" or "dir/" or "./dir/")
and dir exists under the workspace directory then "dir/file.yml" will be
selected but not "new_directory/f.yml" and not "some/dir/f.yml"
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance