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

Add pylint to CI #290

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:

- name: Install dependencies
run: |
pip install .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xjules , it seems your comment here has been lost. This line is added in order to let pylint check that everything is importable, so this is used only to get the dependencies in, not to get komodo itself in.

pip install -r dev-requirements.txt

- name: Run black
Expand All @@ -39,3 +40,7 @@ jobs:
- name: Lint with flake8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: is the idea that pylint will replace flake8, maybe when its errors have been dealt with? Or do we normally have both on a project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will run both.

run: |
flake8

- name: pylint
run: |
pylint komodo tests setup.py
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black
flake8
isort
pylint
pytest
55 changes: 55 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,57 @@
[flake8]
max-line-length = 88

[pylint.message]
disable = bad-inline-option,
bare-except,
broad-except,
consider-using-dict-items,
consider-using-f-string,
consider-using-from-import,
consider-using-set-comprehension,
consider-using-sys-exit,
consider-using-with,
deprecated-pragma,
duplicate-code,
expression-not-assigned,
file-ignored,
fixme,
inconsistent-return-statements,
invalid-name,
keyword-arg-before-vararg,
line-too-long,
literal-comparison,
locally-disabled,
logging-not-lazy,
missing-class-docstring,
missing-function-docstring,
missing-module-docstring,
missing-timeout,
no-else-raise,
no-else-return,
protected-access,
raise-missing-from,
raw-checker-failed,
redefined-builtin,
redefined-outer-name,
suppressed-message,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-locals,
too-many-statements,
unidiomatic-typecheck,
unnecessary-comprehension,
unnecessary-lambda,
unnecessary-pass,
unspecified-encoding,
unused-argument,
unused-import,
unused-variable,
use-a-generator,
use-dict-literal,
use-implicit-booleaness-not-comparison,
use-symbolic-message-instead,
used-before-assignment,
useless-object-inheritance,
wrong-import-position,