-
-
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(pre-commit): corrected pre-commit args for megalinter-full #2411
Conversation
containernam argument contained bot the flag and value on the same line. These have to be separate line
Can you elaborate on how to reproduce this error? We have been using the pre-commit hooks successfully for a while now. You are the second person to report this, but I would like to know how I can meaningfully test this change. |
For sure, I installed it using my .mega-linter.yaml file is as follows:
my pre-commit is configured using the following:
The above config will generate the below error when magalinter-full is triggered
if I change the pre-commit config to the following, the error goes away:
In the code on megaliter-incremental, you define the arg flags and values on separate lines. I replicated this behavior for magalinter-full and it resolved the error. Below is the current .pre-commit-hooks.yaml in megalinter
To test, just create a new repository, install pre-commit package, dump my pre-commit config in, change push to commit and comment out the incremental. dump a test python file in, then run pre-commit. You will see the error. Does this help? |
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.
Thank you for catching this. I was able to reproduce this issue following the steps you provided!
@@ -36,7 +36,8 @@ | |||
require_serial: true | |||
args: | |||
- mega-linter-runner | |||
- --containername megalinter-full | |||
- --containername | |||
- "megalinter-full" |
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.
Are the double quotes actually necessary?
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.
Thanks for catching the issue and fixing it :)
containername argument contained both the flag and value on the same line. These have to be on a separate line
This corrects an error with the use of pre-commit with megalinter-full. An error would return about not having a specified container name.
Proposed Changes
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance