From 253df6f9f821a3052b56673d5427aca9dfe41eba Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 16 Aug 2023 14:27:16 -0400 Subject: [PATCH] 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. --- .github/workflows/lint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2c8d3e19b..547a520cc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: with: python-version: '3.x' - run: python -m pip install pylint - - run: pylint mesonbuild + - run: pylint --output-format colorized mesonbuild flake8: runs-on: ubuntu-latest @@ -37,7 +37,7 @@ jobs: with: python-version: '3.x' - run: python -m pip install flake8 - - run: flake8 mesonbuild/ + - run: flake8 --color always mesonbuild/ mypy: runs-on: ubuntu-latest @@ -50,3 +50,5 @@ jobs: - run: python run_mypy.py --allver env: PYTHONUNBUFFERED: 1 + TERM: xterm-color + MYPY_FORCE_COLOR: 1