Skip to content

Commit

Permalink
Re-enable flak8 linter
Browse files Browse the repository at this point in the history
  • Loading branch information
vitodb committed Dec 26, 2023
1 parent daaac11 commit 119463f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .Jenkins/workflows/Jenkinsfile_EL9
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pipeline {
echo "prepare docker image ${flake8StageDockerImage}"
sh "docker build --pull --tag ${flake8StageDockerImage} --build-arg BASEIMAGE=hepcloud/decision-engine-ci-el9:${BRANCH} --build-arg UID=\$(id -u) --build-arg GID=\$(id -g) -f decisionengine/package/ci/EL9/Dockerfile decisionengine/package/ci/EL9/"
echo "Run ${STAGE_NAME} tests"
sh "docker run --rm --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}/decisionengine:${WORKSPACE}/decisionengine -w ${WORKSPACE}/decisionengine ${flake8StageDockerImage} \"-m pytest -m flake8 --flake8\" \"flake8.log\""
sh "docker run --rm --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}/decisionengine:${WORKSPACE}/decisionengine -w ${WORKSPACE}/decisionengine ${flake8StageDockerImage} \"-m flake8\" \"flake8.log\""
}
post {
always {
Expand Down
21 changes: 21 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[flake8]
max-line-length = 120
# Errors and warnings to ignore
extend-ignore =
# line too long (90 > 79 characters)
E501,
# too many blank lines (2)
E303,
# expected 2 blank lines, found 1
E302,
# at least two spaces before inline comment
E261,
# block comment should start with '# '
E265,
# whitespace before ':'
E203,
# permit line breaks in binary operators
W503,
# permit line breaks in binary operators
W504,

5 changes: 2 additions & 3 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ on:

jobs:
run_flake8:
if: ${{ github.ref == 'refs/heads/1.7' }}
name: Run pytest-flake8 against code tree
name: Run flake8 against code tree
runs-on: ubuntu-latest
steps:
- name: checkout code tree
Expand Down Expand Up @@ -65,7 +64,7 @@ jobs:
env:
PYTHONPATH: ${{ github.workspace }}/src
run: |
pytest -m flake8 --flake8 --log-level=error
python3 -m flake8
run_pylint:
name: Run pylint against code tree
Expand Down

0 comments on commit 119463f

Please sign in to comment.