Move pylint helper from dmlc-core. (#8101)

* Move pylint helper from dmlc-core.

- Move the helper into the XGBoost ci_build.
- Run it with multiprocessing.

* Fix original test.
This commit is contained in:
Jiaming Yuan
2022-07-23 08:12:37 +08:00
committed by GitHub
parent 7785d65c8a
commit 3970e4e6bb
4 changed files with 95 additions and 11 deletions

View File

@@ -129,7 +129,7 @@ jobs:
lint:
runs-on: ubuntu-latest
name: Code linting for Python and C++
name: Code linting for C++
steps:
- uses: actions/checkout@v2
with:
@@ -140,11 +140,10 @@ jobs:
architecture: 'x64'
- name: Install Python packages
run: |
python -m pip install wheel setuptools
python -m pip install pylint cpplint numpy scipy scikit-learn pyspark pandas cloudpickle
python -m pip install wheel setuptools cpplint pylint
- name: Run lint
run: |
make lint
LINT_LANG=cpp make lint
doxygen:
runs-on: ubuntu-latest

View File

@@ -28,11 +28,15 @@ jobs:
- name: Run mypy
shell: bash -l {0}
run: |
python tests/ci_build/lint_python.py --format=0 --type-check=1
python tests/ci_build/lint_python.py --format=0 --type-check=1 --pylint=0
- name: Run formatter
shell: bash -l {0}
run: |
python tests/ci_build/lint_python.py --format=1 --type-check=0
python tests/ci_build/lint_python.py --format=1 --type-check=0 --pylint=0
- name: Run pylint
shell: bash -l {0}
run: |
python tests/ci_build/lint_python.py --format=0 --type-check=0 --pylint=1
python-sdist-test:
runs-on: ${{ matrix.os }}