mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
Scorecard findings only showed up in the weekly workflow run against `master`, well after the change had merged. The `lint.sh scorecard` subcommand runs the four file based checks up front, so lefthook catches them at commit time and reviewdog annotates them on the pull request. The checks run against a `git checkout-index` export rather than the working tree. Scanning the tree directly walks every `node_modules` and does not finish; the export takes about 15 seconds. Only checks that lost points are reported, as `scorecard` also warns about things it does not penalize, such as the job level `contents` write the contributors workflow needs to push the card. `scorecard` and `jq` are now required tools. CI agents need `scorecard` installed for the reviewdog runner. --------- Signed-off-by: Amir Zarrinkafsh <3339418+nightah@users.noreply.github.com>
60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
# SPDX-FileCopyrightText: 2026 Authelia
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
---
|
|
runner:
|
|
docs:
|
|
cmd: pnpm -C docs exec eslint --format rdjson .
|
|
format: rdjson
|
|
level: error
|
|
|
|
eslint:
|
|
cmd: pnpm -C web exec eslint --format rdjson .
|
|
format: rdjson
|
|
level: error
|
|
|
|
golangci:
|
|
cmd: golangci-lint run
|
|
errorformat:
|
|
- '%E%f:%l:%c: %m'
|
|
- '%E%f:%l: %m'
|
|
- '%C%.%#'
|
|
level: error
|
|
|
|
shellcheck:
|
|
cmd: .buildkite/steps/lint.sh shellcheck --format=gcc
|
|
errorformat:
|
|
- '%f:%l:%c: %trror: %m'
|
|
- '%f:%l:%c: %tarning: %m'
|
|
- '%f:%l:%c: %tote: %m'
|
|
level: error
|
|
|
|
typos:
|
|
cmd: .buildkite/steps/lint.sh typos .
|
|
errorformat:
|
|
- '%E%f:%l:%c: %m'
|
|
- '%C%.%#'
|
|
level: error
|
|
|
|
yamllint:
|
|
cmd: yamllint -f parsable .
|
|
errorformat:
|
|
- '%f:%l:%c: %m'
|
|
level: error
|
|
|
|
scorecard:
|
|
cmd: .buildkite/steps/lint.sh scorecard
|
|
errorformat:
|
|
- '%E%f:%l:%c: %m'
|
|
- '%C%.%#'
|
|
level: error
|
|
|
|
reuse:
|
|
# reuse reports 'path: message' with no position, so a 1:1 position is added for reviewdog.
|
|
cmd: reuse lint --lines | sed -e 's|^\([^:]*\):|\1:1:1:|'
|
|
errorformat:
|
|
- '%f:%l:%c: %m'
|
|
level: error
|
|
...
|