Skip to content

Commit 253df6f

Browse files
committed
CI: make linters emit colored output
Github Actions supports this fine, but is misdetected by flake8/mypy. Even though pylint defaults to text instead of colorized, we might as well do the right thing here though.
1 parent 1ed619d commit 253df6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
python-version: '3.x'
2929
- run: python -m pip install pylint
30-
- run: pylint mesonbuild
30+
- run: pylint --output-format colorized mesonbuild
3131

3232
flake8:
3333
runs-on: ubuntu-latest
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
python-version: '3.x'
3939
- run: python -m pip install flake8
40-
- run: flake8 mesonbuild/
40+
- run: flake8 --color always mesonbuild/
4141

4242
mypy:
4343
runs-on: ubuntu-latest
@@ -50,3 +50,5 @@ jobs:
5050
- run: python run_mypy.py --allver
5151
env:
5252
PYTHONUNBUFFERED: 1
53+
TERM: xterm-color
54+
MYPY_FORCE_COLOR: 1

0 commit comments

Comments
 (0)