Linters and formatters
Functions of the tools module at v0.5.0. Each returns what a command runs in; import it with import * as tools from "tools".
shellcheck.env
ShellCheck, koalaman/shellcheck-alpine:v0.11.0 by default.
shellcheck.env(
--image: Environment = #koalaman/shellcheck-alpine:v0.11.0,
--opts: String | Null = null,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #koalaman/shellcheck-alpine:<tag>.--optsSHELLCHECK_OPTS, e.g. "-e SC1091".--withSetups of other tools this environment should also carry.--extra_envAny other variable; below --with and the named parameters.
Returns Runnable: The environment, for command { "shellcheck" } on ... or $[...].
Image koalaman/shellcheck-alpine:v0.11.0
Command words shellcheck: import command { "shellcheck" } from "tools"
lask eval shellcheck.env --opts "-e SC1091"hadolint.env
hadolint, the Dockerfile linter, hadolint/hadolint:v2.15.1-alpine by default. A .hadolint.yaml in the project configures it.
hadolint.env(
--image: Environment = #hadolint/hadolint:v2.15.1-alpine,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #hadolint/hadolint:<tag>.--withSetups of other tools this environment should also carry.--extra_envAny other variable, e.g. HADOLINT_FAILURE_THRESHOLD; below --with.
Returns Runnable: The environment, for command { "hadolint" } on ... or $[...].
Image hadolint/hadolint:v2.15.1-alpine
Command words hadolint: import command { "hadolint" } from "tools"
lask eval hadolint.envtflint.env
TFLint, ghcr.io/terraform-linters/tflint:v0.64.0 by default. tflint --init downloads the plugins .tflint.hcl names, from GitHub.
tflint.env(
--image: Environment = #ghcr.io/terraform-linters/tflint:v0.64.0,
--github_token: String | Null = <secret>,
--cache_dir: String | Null = null,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #ghcr.io/terraform-linters/tflint:<tag>.--github_token!!GITHUB_TOKEN, which lifts GitHub's rate limit on plugin downloads; masked in the command log.--cache_dirHost directory mounted at /cache; plugins are kept in /cache/tflint (TFLINT_PLUGIN_DIR).--withSetups of other tools this environment should also carry.--extra_envAny other variable; below --with and the named parameters.
Returns Runnable: The environment, for command { "tflint" } on ... or $[...].
Image ghcr.io/terraform-linters/tflint:v0.64.0
Command words tflint: import command { "tflint" } from "tools"
lask eval tflint.env --cache_dir /tmp/cachegolangci_lint.env
golangci-lint, golangci/golangci-lint:v2.14.0 by default, with the Go it was built with. The mounted project is trusted by Git (safe.directory), since the linters that read history need it.
golangci_lint.env(
--image: Environment = #golangci/golangci-lint:v2.14.0,
--cache_dir: String | Null = null,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #golangci/golangci-lint:<tag>.--cache_dirHost directory mounted at /cache: golangci-lint's cache (/cache/golangci-lint), and Go's module and build caches (/cache/mod, /cache/build), shared with go.env().--withSetups of other tools this environment should also carry.--extra_envAny other variable; below --with and the named parameters.
Returns Runnable: The environment, for command { "golangci-lint" } on ... or $[...].
Image golangci/golangci-lint:v2.14.0
Command words golangci-lint: import command { "golangci-lint" } from "tools"
lask eval golangci_lint.env --cache_dir /tmp/cacheruff.env
Ruff, the Python linter and formatter, ghcr.io/astral-sh/ruff:0.16.9-alpine by default.
ruff.env(
--image: Environment = #ghcr.io/astral-sh/ruff:0.16.9-alpine,
--cache_dir: String | Null = null,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #ghcr.io/astral-sh/ruff:<tag>.--cache_dirHost directory mounted at /cache; Ruff's cache is /cache/ruff (RUFF_CACHE_DIR) instead of .ruff_cache in the project.--withSetups of other tools this environment should also carry.--extra_envAny other variable; below --with and the named parameters.
Returns Runnable: The environment, for command { "ruff" } on ... or $[...].
Image ghcr.io/astral-sh/ruff:0.16.9-alpine
Command words ruff: import command { "ruff" } from "tools"
lask eval ruff.envactionlint.env
actionlint, the GitHub Actions workflow linter, rhysd/actionlint:1.7.12 by default.
actionlint.env(
--image: Environment = #rhysd/actionlint:1.7.12,
--with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
--extra_env: Map<String> = {}
): RunnableParameters
--imageThe image to run; another release is passed as image = #rhysd/actionlint:<tag>.--withSetups of other tools this environment should also carry.--extra_envAny other variable; below --with.
Returns Runnable: The environment, for command { "actionlint" } on ... or $[...].
Image rhysd/actionlint:1.7.12
Command words actionlint: import command { "actionlint" } from "tools"
lask eval actionlint.env