← all checks

Configuration

Project-wide settings live in a .xslint.yml file, discovered by walking up from the current directory (or passed with --config <path>). Command-line flags override the file, and the file overrides the built-in defaults.

# .xslint.yml
preset: all              # default for --preset: recommended or all
rules:
  short-names: off       # turn one check off
  "unused-*": error      # or a family, by glob
exclude:
  - "test/**"                           # globs to skip, relative to this file
only:
  - "unused"                            # default for --only
max-warnings: 10                        # default for --max-warnings
log-level: info                         # default for --log-level
quiet: false                            # default for --quiet
baseline: xslint-baseline.json          # default for --baseline

Unknown top-level keys, rule names that match no check, and values of the wrong type (a non-numeric max-warnings, a non-list exclude or only, a non-boolean quiet, a non-string log-level, preset, or baseline) are reported and ignored, so typos do not pass silently. A preset that does not exist, or an only entry no check name holds, fails the run instead, before a file is read, since a run over the wrong checks would read as a clean report. An exclude glob is named the same way when a run walks a directory and the glob excludes nothing anywhere under it.