mirror of
https://github.com/espressif/esptool.git
synced 2025-10-16 23:06:31 +08:00
docs(sphinx-lint): Add sphinx-lint to pre-commit, GH and GL pipelines
This commit is contained in:
5
.github/workflows/test_esptool.yml
vendored
5
.github/workflows/test_esptool.yml
vendored
@@ -69,8 +69,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Lint and format with ruff
|
||||
- name: Run pre-commit hooks
|
||||
run: |
|
||||
pip install --extra-index-url https://dl.espressif.com/pypi -e .[dev]
|
||||
python -m ruff check
|
||||
python -m ruff format
|
||||
pre-commit run --all-files
|
||||
|
@@ -119,22 +119,14 @@ host_tests_hsm:
|
||||
script:
|
||||
- coverage run --parallel-mode -m pytest ${CI_PROJECT_DIR}/test/test_espsecure_hsm.py
|
||||
|
||||
check_python_style:
|
||||
run_pre_commit_hooks:
|
||||
stage: test
|
||||
image: python:3.7-bullseye
|
||||
tags:
|
||||
- host_test
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: code_quality_report.json
|
||||
when: on_failure
|
||||
script:
|
||||
# This step installs any 'dev' dependencies (ie ruff)
|
||||
# The runner should cache the downloads, so still quite fast.
|
||||
- pip install -e .[dev] --prefer-binary
|
||||
- python -m ruff check --exit-zero --output-format=gitlab --output-file=code_quality_report.json
|
||||
- python -m ruff check
|
||||
- python -m ruff format
|
||||
- pre-commit run --all-files
|
||||
|
||||
.run_esptool: &run_esptool |
|
||||
esptool.py --help
|
||||
|
@@ -5,6 +5,12 @@ repos:
|
||||
- id: ruff # Runs ruff linter (replaces flake8)
|
||||
args: [--fix, --exit-non-zero-on-fix] # --fix for fixing errors
|
||||
- id: ruff-format
|
||||
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
||||
rev: v0.6.8
|
||||
hooks:
|
||||
- id: sphinx-lint
|
||||
name: Lint RST files in docs folder using Sphinx Lint
|
||||
files: ^((docs/en)/.*\.(rst|inc))|CONTRIBUTING.rst$
|
||||
- repo: https://github.com/espressif/conventional-precommit-linter
|
||||
rev: v1.4.0
|
||||
hooks:
|
||||
|
Reference in New Issue
Block a user