Fix the format of the .flake8 file, and exclude the script directory from the py2 linter (#1272)
Flake8's INI config file format requires commas after each line. Because our file didn't have them, the exclude list wasn't set up correctly, and the --extend-exclude flag wasn't working. This PR fixes the .flake8 file. Also, update flake8 to the latest version available (because version 3.8 is required to get the --extend-exclude flag) and use the flag to exclude the files in the scripts/ directory from the python2 linter (since the scripts are python3).
This commit is contained in:
@@ -60,9 +60,9 @@ jobs:
|
|||||||
apt-get install -q -y python-pip python3-pip
|
apt-get install -q -y python-pip python3-pip
|
||||||
- run: python2 -m pip install --upgrade pip
|
- run: python2 -m pip install --upgrade pip
|
||||||
- run: python3 -m pip install --upgrade pip
|
- run: python3 -m pip install --upgrade pip
|
||||||
- run: python2 -m pip install flake8==3.7.8
|
- run: python2 -m pip install flake8==3.9.2
|
||||||
- run: python3 -m pip install flake8==3.7.8
|
- run: python3 -m pip install flake8==3.9.2
|
||||||
- run: python2 -m flake8 --show-source --statistics
|
- run: python2 -m flake8 --show-source --statistics --extend-exclude=./scripts
|
||||||
- run: python3 -m flake8 --show-source --statistics
|
- run: python3 -m flake8 --show-source --statistics
|
||||||
test-linux:
|
test-linux:
|
||||||
executor: bionic
|
executor: bionic
|
||||||
|
|||||||
31
.flake8
31
.flake8
@@ -5,19 +5,20 @@ ignore =
|
|||||||
E501, # Line too long
|
E501, # Line too long
|
||||||
E121, # Continuation line under-indented for hanging indent
|
E121, # Continuation line under-indented for hanging indent
|
||||||
E722 # bare excepts
|
E722 # bare excepts
|
||||||
|
E741, # Variable names such as 'l', 'O', or 'I'
|
||||||
exclude =
|
exclude =
|
||||||
./llvm
|
./llvm,
|
||||||
./gnu
|
./gnu,
|
||||||
./upstream
|
./upstream,
|
||||||
./fastcomp
|
./fastcomp,
|
||||||
./fastcomp-clang
|
./fastcomp-clang,
|
||||||
./releases
|
./releases,
|
||||||
./clang
|
./clang,
|
||||||
./emscripten
|
./emscripten,
|
||||||
./binaryen
|
./binaryen,
|
||||||
./git
|
./git,
|
||||||
./node
|
./node,
|
||||||
./python
|
./python,
|
||||||
./temp
|
./temp,
|
||||||
./downloads
|
./downloads,
|
||||||
./crunch
|
./crunch,
|
||||||
|
|||||||
Reference in New Issue
Block a user