diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000000..2ce137ef4b --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,9 @@ +paths: + # The triage workflow uses a quoted heredoc (<<'EOF') with ${VAR} + # placeholders that envsubst expands later. Shellcheck's SC2016 + # warns about unexpanded variables in single-quoted strings, but + # the non-expansion is intentional here. Actionlint doesn't honor + # inline shellcheck disable directives inside heredocs. + .github/workflows/triage-via-chat-api.yaml: + ignore: + - 'SC2016' diff --git a/docs/about/contributing/CONTRIBUTING.md b/docs/about/contributing/CONTRIBUTING.md index a042f29fb9..5e001f27fc 100644 --- a/docs/about/contributing/CONTRIBUTING.md +++ b/docs/about/contributing/CONTRIBUTING.md @@ -71,6 +71,8 @@ Use the following `make` commands and scripts in development: - `make install` installs binaries to `$GOPATH/bin` - `make test` - `make pre-commit` runs gen, fmt, lint, typos, and builds a slim binary +- `make pre-commit-light` runs fmt and lint for shell, terraform, markdown, + helm, actions, and typos (skips gen, Go/TS lint+fmt, and binary build) - `make pre-push` runs heavier CI checks including tests (allowlisted) Install the git hooks to run these automatically: @@ -79,6 +81,12 @@ Install the git hooks to run these automatically: git config core.hooksPath scripts/githooks ``` +The hooks classify staged/changed files and select the appropriate target. +Commits that only touch docs, shell, terraform, or other lightweight files +run `make pre-commit-light` instead of the full `make pre-commit`, and +`pre-push` is skipped entirely. Changes to Go, TypeScript, SQL, proto, or +the Makefile trigger the full targets as before. + ### Running Coder on development mode 1. Run the development script to spin up the local environment: