How to configure mega-linter to only lint a certain folder in monorepo? #2906
Replies: 2 comments 2 replies
-
Once you use DEFAULT_WORKSPACE, MegaLinter will consider it as the root so won't search in parent folders As Probably we should change the line that you identified to add a condition when DEFAULT_WORKSPACE is overridden, maybe you'd like to try a PR ? :) |
Beta Was this translation helpful? Give feedback.
2 replies
-
Should we close this and continue the discussion at #2912? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion continued in: #2912
my configuration is as follows:
workflow job:
The project contains a react project in app/react. I basically want to linter to only check for modified files in this directory. When scanning for modified files a get a correct list from the git diff, but the filtered list only includes the .gitignore:
I suspect it's because of line 761 in MegaLinter.py
if os.path.isfile(self.workspace + os.path.sep + diff_line):
How should I configure the workflow so that it recognises files like "app/react/src/pages/administration/inbox/InboxEditForm.tsx" ?
Additional question, currently we are setting DEFAULT_WORKSPACE: app/react. Otherwise it can't find the .eslintrc.json file. Is there also another to configure the path to this lint file? I wasn't able to find any in the docs.
Beta Was this translation helpful? Give feedback.
All reactions