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 5eb2f2b commit 6babb53
Show file tree
Hide file tree
Showing 3 changed files with 27 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_modules/package/ci/EL9/Dockerfile decisionengine_modules/package/ci/EL9/"
echo "Run ${STAGE_NAME} tests"
sh "docker run --rm --env GITHUB_PR_NUMBER=${GITHUB_PR_NUMBER} --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}/decisionengine_modules:${WORKSPACE}/decisionengine_modules -w ${WORKSPACE}/decisionengine_modules ${flake8StageDockerImage} \"-m pytest -m flake8 --flake8\" \"flake8.log\" \"${BRANCH}\""
sh "docker run --rm --env GITHUB_PR_NUMBER=${GITHUB_PR_NUMBER} --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}/decisionengine_modules:${WORKSPACE}/decisionengine_modules -w ${WORKSPACE}/decisionengine_modules ${flake8StageDockerImage} \"-m flake8\" \"flake8.log\" \"${BRANCH}\""
}
post {
always {
Expand Down
24 changes: 24 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[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
exclude: []
count: True
show-source: True
statistics: True
5 changes: 2 additions & 3 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,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 DE Modules
Expand Down Expand Up @@ -92,7 +91,7 @@ jobs:
PYTHONPATH: ${{ github.workspace }}/../:${{ github.workspace }}
run: |
cd ${{ github.workspace }}/decisionengine_modules
pytest -m flake8 --flake8 --log-level=WARNING
python3 -m flake8
run_pylint:
name: Run pylint against code tree
Expand Down

0 comments on commit 6babb53

Please sign in to comment.