tool configuration
* seperate tool config and tool call * rename black stage to code consistency for a greater readability - remove allow_failure from the third stage I did decide to remove the allowed failure tag to encourage a higher code quality.
This commit is contained in:
parent
fa87c166ed
commit
8b26b1eb8e
|
@ -16,24 +16,23 @@ before_script:
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- syntax
|
- syntax
|
||||||
- black
|
- code consistency
|
||||||
- pep8
|
- flake8
|
||||||
|
|
||||||
syntax:
|
syntax:
|
||||||
stage: syntax
|
stage: syntax
|
||||||
script:
|
script:
|
||||||
# breaking errors ie syntax errors
|
# flake8 check only breaking errors ie syntax errors
|
||||||
- flake8 --select=E9,F63,F7,F82 --show-source
|
- flake8 --select=E9,F63,F7,F82 --show-source
|
||||||
|
|
||||||
black:
|
black:
|
||||||
stage: black
|
stage: code consistency
|
||||||
script:
|
script:
|
||||||
# code consistency
|
# code consistency
|
||||||
- black . --check --line-length 120
|
- black . --check
|
||||||
|
|
||||||
pep8:
|
pep8:
|
||||||
stage: pep8
|
stage: flake8
|
||||||
script:
|
script:
|
||||||
# pep8 warnings and other non breaking warnings
|
# full flake8 test
|
||||||
- flake8 --max-complexity=10 --max-line-length=120 --show-source
|
- flake8 --show-source
|
||||||
allow_failure: true
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
[tool.black]
|
||||||
|
line-length = 120
|
||||||
|
target-version = ['py37', 'py38']
|
||||||
|
include = '\.pyi?$'
|
||||||
|
exclude = '''
|
||||||
|
(
|
||||||
|
/(
|
||||||
|
\.eggs # exclude a few common directories in the
|
||||||
|
| \.git # root of the project
|
||||||
|
| \.hg
|
||||||
|
| \.mypy_cache
|
||||||
|
| \.tox
|
||||||
|
| \.venv
|
||||||
|
| _build
|
||||||
|
| buck-out
|
||||||
|
| build
|
||||||
|
| dist
|
||||||
|
)/ # the root of the project
|
||||||
|
)
|
||||||
|
'''
|
Loading…
Reference in New Issue