Skip to content

Commit

Permalink
iotests/297: Move pylint config into pylintrc
Browse files Browse the repository at this point in the history
Move --score=n and --notes=XXX,FIXME into pylintrc. This pulls
configuration out of code, which I think is probably a good thing in
general.

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Hanna Reitz <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
  • Loading branch information
jnsnow committed Nov 1, 2021
1 parent af53175 commit 95a556e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 1 addition & 3 deletions tests/qemu-iotests/297
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ def run_linters():
print('=== pylint ===')
sys.stdout.flush()

# Todo notes are fine, but fixme's or xxx's should probably just be
# fixed (in tests, at least)
env = os.environ.copy()
subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX', *files),
subprocess.run(('pylint-3', *files),
env=env, check=False)

print('=== mypy ===')
Expand Down
16 changes: 16 additions & 0 deletions tests/qemu-iotests/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ disable=invalid-name,
too-many-statements,
consider-using-f-string,


[REPORTS]

# Activate the evaluation score.
score=no


[MISCELLANEOUS]

# List of note tags to take in consideration, separated by a comma.
# TODO notes are fine, but FIXMEs or XXXs should probably just be
# fixed (in tests, at least).
notes=FIXME,
XXX,


[FORMAT]

# Maximum number of characters on a single line.
Expand Down

0 comments on commit 95a556e

Please sign in to comment.