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 linters to Travis: Python #264

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0495331
Add linters to Travis: Python
digitalfishpond Oct 19, 2017
1bf5135
Merge branch 'master' into add-linters-python
kornicameister Oct 23, 2017
d39e8e0
Merge branch 'master' into add-linters-python
kornicameister Oct 26, 2017
4be1b9a
Merge branch 'master' into add-linters-python
kornicameister Oct 26, 2017
964da96
Merge remote-tracking branch 'upstream/master' into add-linters-python
digitalfishpond Oct 27, 2017
2f9aa74
Merge remote-tracking branch 'origin/add-linters-python' into add-lin…
digitalfishpond Oct 27, 2017
44e6c07
Merge remote-tracking branch 'upstream/master' into add-linters-python
digitalfishpond Oct 30, 2017
4ff8daf
Add setup.cfg to configure linters
digitalfishpond Oct 30, 2017
1c58ea1
Merge branch 'master' into add-linters-python
digitalfishpond Oct 31, 2017
10c960d
Add setup.cfg to configure linters
digitalfishpond Oct 31, 2017
f24ea1d
Merge remote-tracking branch 'origin/add-linters-python' into add-lin…
digitalfishpond Oct 31, 2017
37bf898
cleanup.py
digitalfishpond Nov 3, 2017
3bb288e
Merge branch 'master' into add-linters-python
digitalfishpond Nov 3, 2017
005b776
Merge branch 'master' into add-linters-python
digitalfishpond Nov 8, 2017
92e08d1
Updated to get flake8 from pip3
digitalfishpond Nov 20, 2017
5a2cf2b
Merge branch 'master' into add-linters-python
digitalfishpond Nov 20, 2017
b1c49db
Merge remote-tracking branch 'origin/add-linters-python' into add-lin…
digitalfishpond Nov 20, 2017
a9af369
reverted to pip for flake8
digitalfishpond Nov 21, 2017
74cd30e
Merge branch 'master' into add-linters-python
digitalfishpond Nov 21, 2017
799a242
ignore python 3 syntax unrecognised for python 2
digitalfishpond Nov 21, 2017
d45786b
Merge remote-tracking branch 'origin/add-linters-python' into add-lin…
digitalfishpond Nov 21, 2017
40b07dd
Merge branch 'master' into add-linters-python
digitalfishpond Nov 22, 2017
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
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ before_install:
- pip install pip --upgrade
- pip install git+https://github.com/timothyb89/dbuild.git
- pip install google-cloud-storage
- pip install flake8 flake8-blind-except flake8-builtins flake8-pep3101 flake8-coding
- pip install pylint
- docker --version
- docker-compose --version

jobs:
include:
- stage: lint-shellcheck
script: bash -c 'shopt -s globstar; shellcheck **/*.sh'
- stage: linting-flake8
script: flake8
- stage: linting-pylint
script: pylint --rcfile=setup.cfg *
- stage: lint-shellcheck
Copy link
Member

Choose a reason for hiding this comment

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

Remove duplicated shellcheck stage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

script: bash -c 'shopt -s globstar; shellcheck **/*.sh'
- stage: metrics-pipeline
Expand Down
21 changes: 21 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[flake8]
# D203 1 blank line required before class docstring
# H201 no 'except:' at least use 'except Exception:'
# H302 import only modules
# H405 multi line docstring summary not separated with an empty line
ignore = D203,H201,H302,H405
# H106: Don’t put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
enable-extensions = H106,H203
Copy link
Member

Choose a reason for hiding this comment

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

All Hxxx are comming from OpenStack hacking https://docs.openstack.org/hacking/latest/ so it also need to be installed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

max-complexity = 50
max-line-length = 120
exclude =.env,.git,doc,*lib/python*,build,dist,*.egg
show-source = True
builtins = _

[pylint]
disable = C0103,C0111,F0010
Copy link
Member

Choose a reason for hiding this comment

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

Put comments with description what are you disabling (like in 2-5 lines)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

ignore = .env,.git,doc,*lib/python*,build,dist,*.egg
ignore-docstrings = yes
output-format = parseable
max-line-length = 120