Skip to content

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.

lask
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> = {}
): Runnable

Parameters

  • --image The image to run; another release is passed as image = #koalaman/shellcheck-alpine:<tag>.
  • --opts SHELLCHECK_OPTS, e.g. "-e SC1091".
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval shellcheck.env --opts "-e SC1091"

lib/shellcheck.lask

hadolint.env ​

hadolint, the Dockerfile linter, hadolint/hadolint:v2.15.1-alpine by default. A .hadolint.yaml in the project configures it.

lask
hadolint.env(
  --image: Environment = #hadolint/hadolint:v2.15.1-alpine,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

Parameters

  • --image The image to run; another release is passed as image = #hadolint/hadolint:<tag>.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval hadolint.env

lib/hadolint.lask

tflint.env ​

TFLint, ghcr.io/terraform-linters/tflint:v0.64.0 by default. tflint --init downloads the plugins .tflint.hcl names, from GitHub.

lask
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> = {}
): Runnable

Parameters

  • --image The 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_dir Host directory mounted at /cache; plugins are kept in /cache/tflint (TFLINT_PLUGIN_DIR).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval tflint.env --cache_dir /tmp/cache

lib/tflint.lask

golangci_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.

lask
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> = {}
): Runnable

Parameters

  • --image The image to run; another release is passed as image = #golangci/golangci-lint:<tag>.
  • --cache_dir Host 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().
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval golangci_lint.env --cache_dir /tmp/cache

lib/golangci_lint.lask

ruff.env ​

Ruff, the Python linter and formatter, ghcr.io/astral-sh/ruff:0.16.9-alpine by default.

lask
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> = {}
): Runnable

Parameters

  • --image The image to run; another release is passed as image = #ghcr.io/astral-sh/ruff:<tag>.
  • --cache_dir Host directory mounted at /cache; Ruff's cache is /cache/ruff (RUFF_CACHE_DIR) instead of .ruff_cache in the project.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval ruff.env

lib/ruff.lask

actionlint.env ​

actionlint, the GitHub Actions workflow linter, rhysd/actionlint:1.7.12 by default.

lask
actionlint.env(
  --image: Environment = #rhysd/actionlint:1.7.12,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

Parameters

  • --image The image to run; another release is passed as image = #rhysd/actionlint:<tag>.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any 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"

bash
lask eval actionlint.env

lib/actionlint.lask

Released under the MIT License.