Skip to content
Snippets Groups Projects
Commit d51d9093 authored by Iñigo Moreno i Caireta's avatar Iñigo Moreno i Caireta
Browse files

Use single file to find python files

parent 034d4cc9
No related branches found
No related tags found
1 merge request!96Resolve "Flake8 not running for files with pyhton shebang but no py extension"
Pipeline #142793 passed
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
stage: build stage: build
before_script: ${PYTHON_VERSION} -m pip -q install flake8 before_script: ${PYTHON_VERSION} -m pip -q install flake8
script: script:
- find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + > /tmp/shebang_python_files - find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + > /tmp/python_files
- find . -type f -name "*.py" > /tmp/extension_python_files - find . -type f -name "*.py" >> /tmp/python_files
- sort /tmp/extension_python_files /tmp/shebang_python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source - sort /tmp/python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
.flake8_extended_template: .flake8_extended_template:
extends: .flake8_template extends: .flake8_template
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment