Bug 1555560: Run black format check in automation; r=ahal,sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D33126
This commit is contained in:
Chris AtLee 2020-07-08 22:08:06 +00:00
Родитель d1fb386dae
Коммит 676e2f71c7
4 изменённых файлов: 26 добавлений и 1 удалений

Просмотреть файл

@ -16,6 +16,7 @@ path:tools/lint/eslint/eslint-plugin-mozilla/manifest.tt
path:tools/lint/eslint/manifest.tt
path:tools/lint/python/flake8_requirements.txt
path:tools/lint/python/pylint_requirements.txt
path:tools/lint/python/black_requirements.txt
path:tools/lint/tox/tox_requirements.txt
# Required for the webrender docker image

Просмотреть файл

@ -217,6 +217,20 @@ py-flake8:
# moz.configure files are also Python files.
- '**/*.configure'
py-black:
description: black run over the gecko codebase
treeherder:
symbol: py(black)
run:
mach: lint -v -l black -f treeherder -f json:/builds/worker/mozlint.json *
when:
files-changed:
- '**/*.py'
- 'pyproject.toml'
- 'tools/lint/flake8.yml'
# moz.configure files are also Python files.
# However, we don't currently check them with black
py-pylint:
description: pylint run over the gecko codebase
treeherder:

Просмотреть файл

@ -36,6 +36,8 @@ ADD topsrcdir/tools/lint/python/pylint_requirements.txt /tmp/pylint_requirements
ADD topsrcdir/tools/lint/spell/codespell_requirements.txt /tmp/codespell_requirements.txt
# %include tools/lint/tox/tox_requirements.txt
ADD topsrcdir/tools/lint/tox/tox_requirements.txt /tmp/tox_requirements.txt
# %include tools/lint/python/black_requirements.txt
ADD topsrcdir/tools/lint/python/black_requirements.txt /tmp/black_requirements.txt
RUN bash /tmp/system-setup.sh
# %include taskcluster/scripts/run-task

Просмотреть файл

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# This allows ubuntu-desktop to be installed without human interaction
# This allows packages to be installed without human interaction
export DEBIAN_FRONTEND=noninteractive
set -ve
@ -109,6 +109,14 @@ cd /setup
pip3 install --require-hashes -r /tmp/tox_requirements.txt
###
# Black Setup
###
cd /setup
pip3 install --require-hashes -r /tmp/black_requirements.txt
###
# rustfmt and clippy
###