Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Warnings

Lūn supports various warnings. Each warning has a name and a default level. The levels are:

  • allow: Do not print a warning
  • warn: Print a warning, but continue
  • deny: Print a warning and exit with failure

Levels can be overridden on the command line with --allow/-A, --warn/-W, or --deny/-D, or in the configuration file in the allow, warn, or deny arrays.

lun warns lists the warnings, and lun warns WARN prints the documentation for WARN.

careful

Warns when careful is not set at CLI or config level.

careful causes lun to include tool versions in its cache keys. This can add significant overhead, and so is disabled by default. However, this means that lun might not re-run a linter after the tool itself has been upgraded.

Default level: allow

In groups:

  • pedantic

mtime

Warns when mtime is enabled.

mtime causes lun to skip files that have identical metadata to the last time lun was run. This can significantly speed things up and is enabled by default. However, in certain pathological cases, it can result in not running tools when they should be run (e.g., if the system time was changed).

Default level: allow

In groups:

  • pedantic

no-files

Warns when a tool has an empty files array.

A tool with an empty files array will never match any files, making it effectively useless.

Default level: deny

refs

Warns when refs is used on CLI or config file.

Like mtime, refs causes lun to skip certain files. However, it implicitly assumes that the exact same version and configuration of the linter was run on the refs in question. In certain cases, it can result in not running tools when they should be run. refs is not enabled by default.

Default level: allow

In groups:

  • all
  • pedantic

unknown-tool

An unknown tool name passed to --skip-tool or --only-tool.

Default level: warn

In groups:

  • all
  • pedantic

unknown-warning

An unknown warning was passed to --allow/-A, --warn/-W, or --deny/-D, or was listed in the configuration file under allow/warn/deny.

Default level: deny

In groups:

  • all
  • pedantic

unlisted-config

Warns when lun finds a configuration file for a tool that is not listed in lun.toml. Tools might have different output in different configurations, and so it is important that they are re-run if their configuration changes. Tool configuration files listed in lun.toml form part of lun’s cache keys.

Default level: allow

In groups:

  • all
  • pedantic

cache-full

Warns when the cache is full and entries are being dropped.

Default level: allow

cache-usage

Warns when a single execution uses more than a quarter of the cache size.

Default level: warn