mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
tools: enable strict mode for yamllint
Treats warnings as errors, so we can detect regressions. Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/67380 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
3 files changed
+5
-3
No files matched your search
@@ -50,7 +50,7 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 2
|
||||
persist-credentials: true # We need read access in case we need to fetch in `Compute requisites before change` step
|
||||
persist-credentials: true # We need read access in case we need to fetch in `Compute requisites before change` step
|
||||
sparse-checkout: |
|
||||
shell.nix
|
||||
tools/nix/
|
||||
|
||||
@@ -1739,15 +1739,17 @@ endif
|
||||
# python -m pip install yamllint
|
||||
# Try with '--system' if it fails without; the system may have set '--user'
|
||||
lint-yaml-build: ## Build resources needed to lint YAML files.
|
||||
ifeq ($(YAMLLINT), tools/pip/site-packages/bin/yamllint)
|
||||
$(info Pip installing yamllint on $(shell $(PYTHON) --version)...)
|
||||
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages yamllint || \
|
||||
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint
|
||||
endif
|
||||
|
||||
.PHONY: lint-yaml
|
||||
ifneq ("","$(wildcard $(YAMLLINT))")
|
||||
lint-yaml: ## Lint the YAML files with yamllint.
|
||||
$(info Running YAML linter...)
|
||||
PYTHONPATH=tools/pip $(YAMLLINT) .
|
||||
PYTHONPATH=tools/pip $(YAMLLINT) --strict .
|
||||
else
|
||||
lint-yaml:
|
||||
$(warning YAML linting with yamllint is not available)
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for npm trusted publishing
|
||||
id-token: write # for npm trusted publishing
|
||||
concurrency:
|
||||
group: npm-publish
|
||||
cancel-in-progress: false
|
||||
|
||||
Reference in new issue
Block a user