-
-
Notifications
You must be signed in to change notification settings - Fork 12
Add --ignore-warnings
argument
#46
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
Conversation
In my usecase, I want to show warnings to the developer (via pre-commit), but don't want to output them in CI. Here such setting would be handy.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 127 130 +3
=========================================
+ Hits 127 130 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Thx @amureki, appreciate the initiative. IMHO, coloring output would also be helpful here. I was considering adding both click
and rich
as dependencies. They are well-supported and would allow the package to become more sophisticated.
relint/__main__.py
Outdated
@@ -42,6 +42,9 @@ def parse_args(args=None): | |||
parser.add_argument( | |||
"-W", "--fail-warnings", action="store_true", help="Fail for warnings." | |||
) | |||
parser.add_argument( | |||
"--ignore-warnings", action="store_true", help="Ignore warnings." |
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.
The help text isn't helpful, since it's identical to the argument itself. Your PR description is a good start. Please avoid repeating words, since they will likely not add any new context.
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.
Totally makes sense, I updated the wording. 👍
* origin/main: Make sure we receive `int` exit code
@codingjoe I addressed text comment. But this (especially click) could be a bigger change, so we'd better go with it separately. What do you think? |
In my usecase, I want to show warnings to the developer (via pre-commit), but don't want to output them in CI. Here such setting would be handy.
P.S. I am basing this PR on top of #45 as it has fixed tests suite, which is needed here.