Skip to content

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

Merged
merged 4 commits into from
Mar 7, 2023
Merged

Add --ignore-warnings argument #46

merged 4 commits into from
Mar 7, 2023

Conversation

amureki
Copy link
Collaborator

@amureki amureki commented Feb 27, 2023

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.

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.
@amureki amureki added the enhancement New feature or request label Feb 27, 2023
@amureki amureki self-assigned this Feb 27, 2023
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (8a4491e) 100.00% compared to head (653d16c) 100.00%.

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     
Impacted Files Coverage Δ
relint/__main__.py 100.00% <100.00%> (ø)
relint/config.py 100.00% <100.00%> (ø)

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@codingjoe codingjoe left a 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.

@@ -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."
Copy link
Owner

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.

Copy link
Collaborator Author

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. 👍

Base automatically changed from exit-code to main March 7, 2023 09:38
@amureki
Copy link
Collaborator Author

amureki commented Mar 7, 2023

@codingjoe I addressed text comment.
Regarding rich and click - wonderful idea, I like these packages and agree that they are well-maintained and can improve DX here.

But this (especially click) could be a bigger change, so we'd better go with it separately. What do you think?

@codingjoe codingjoe merged commit 5c3d9e9 into main Mar 7, 2023
@codingjoe codingjoe deleted the ignore-warnings branch March 7, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants