Skip to content

assay config [--verbose]

Prints the configuration in effect, as assay reads it: the preset, the rules with their tier, the checks, the gate conditions, the excluded paths, and every configuration error. It judges nothing. Configuration says what it is for, with a sample of its output.

assay config [--verbose] [--color auto|always|never]

Run it after every edit of the options file: the editor and dart analyze cannot show a configuration error, and config prints each one (Configuration errors).

Option Effect
--verbose Print everything, each value with the file it came from: the file of the rule map, every rule parameter of every rule, every key of every check and of the gate conditions, and every excluded pattern.
--color auto|always|never The form of the output, as for every command.

The command takes no argument.

Terminal window
assay config # what the project chose
assay config --verbose # every value, with the file it came from

Titled boxes. Without --verbose they hold what the project chose and leave out what it left alone: a rule parameter, a key of a check or a key of the gate conditions is printed only where its value is not the default, the boxes of the checks and of the gate conditions only where the project changed one of them, and the list of excluded paths is cut short. Viewing the configuration in effect shows this output and says what each box holds.

The head box gives the version of the program beside the version of assay_lints the project resolves, and says so where they differ (Managing versions).

With --verbose nothing is left out. Two parts of that output follow.

The gate conditions, for a project that writes min_on_new_lines and max_on_new_lines, and an included team file that writes min_overall:

╭─ Gate conditions ───────────────────────────────────────────── 3 conditions ─╮
│ Key Value Set in │
│ ─────────────────────────────────────────────────── │
│ coverage │
│ min_on_new_lines 80 analysis_options.yaml │
│ min_overall 72.5 options/team.yaml │
│ small_change 20 default │
│ duplication │
│ max_on_new_lines 3 analysis_options.yaml │
│ max_overall no ceiling default │
│ small_change 20 default │
╰──────────────────────────────────────────────────────────────────────────────╯

A condition no file writes shows as no threshold or no ceiling, set in default. The count on the right of the top line counts the conditions written, thresholds and ceilings together.

The cross-file checks, for a project that writes min_tokens: 150 for duplicated_code and switches unused_l10n off. --verbose lists every key of each check that is on, with the file it came from:

╭─ Cross-file checks ─────────────────────────────────────────── 4 on · 1 off ─╮
│ Key Value Set in │
│ ──────────────────────────────────────── │
│ ● unused_code │
│ exclude [] default │
│ ● unused_files │
│ exclude [] default │
│ ○ unused_l10n off in analysis_options.yaml │
│ ● unnecessary_nullable │
│ exclude [] default │
│ ● duplicated_code │
│ exclude [] default │
│ min_tokens 150 analysis_options.yaml │
│ min_lines 10 default │
╰──────────────────────────────────────────────────────────────────────────────╯
Code When
0 The configuration has no error.
2 The configuration is in error. config still prints what it can, with every error in the last box. Or a usage error: an argument.