Skip to content
Snippets Groups Projects

Resolve "Flake8 not running for files with pyhton shebang but no py extension"

All threads resolved!
+ 4
5
.flake8_template:
stage: build
before_script: ${PYTHON_VERSION} -m pip -q install flake8
script:
- find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + > /tmp/shebang_python_files
- find . -type f -name "*.py" > /tmp/extension_python_files
- sort /tmp/extension_python_files /tmp/shebang_python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
script:
- find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + > /tmp/shebang_python_files
- find . -type f -name "*.py" > /tmp/extension_python_files
- sort /tmp/extension_python_files /tmp/shebang_python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
.flake8_extended_template:
extends: .flake8_template
Loading