Skip to content
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

run-linters: Add --errors-only mode #215

Merged
merged 2 commits into from Jul 28, 2023
Merged

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Jul 28, 2023

Running the linters during the Ubuntu package build or in the autopkgtest is not wanted because newer linter versions can introduce new checks that can cause the build/autopkgtest to fail.

So add an --errors-only mode that skips all formatting checks, but keeps the checks that can detect real errors. So run pylint with --errors-only and mypy.

Bug: https://launchpad.net/bugs/2028881

To ease readability and future changes, move all code in individual
functions.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Running the linters during the Ubuntu package build or in the
autopkgtest is not wanted because newer linter versions can introduce
new checks that can cause the build/autopkgtest to fail.

So add an `--errors-only` mode that skips all formatting checks, but
keeps the checks that can detect real errors. So run pylint with
`--errors-only` and mypy.

Bug: https://launchpad.net/bugs/2028881
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
@bdrung bdrung requested a review from schopin-pro July 28, 2023 11:34
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #215 (0672bcd) into main (048b971) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   82.81%   82.81%           
=======================================
  Files          91       91           
  Lines       18706    18706           
=======================================
  Hits        15492    15492           
  Misses       3214     3214           

@schopin-pro schopin-pro merged commit b164d45 into canonical:main Jul 28, 2023
24 checks passed
@bdrung bdrung deleted the error branch July 28, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants