Skip to content
Kuniwak edited this page Jul 5, 2016 · 5 revisions

Policy

Policy settings

  • YAML:

     policies:
       PolicyFoo:
         enabled: true
    
       PolicyBar:
         enabled: no

See Vint linting policy summary.

Severity

Severity settings

  • error: Report only errors

  • warning: Report errors and warnings

  • style_problem: Report errors, warnings and style problems

  • CLI:

    • -e, --error
    • -w, --warning
    • -s, --style-problem
  • YAML:

    • cmdargs.severity

       cmdargs:
         severity: style_problem

Default: warning

Environment

Neovim

  • CLI:

    • --enable-neovim
  • YAML:

     cmdargs:
       env:
         neovim: true

Default: false

Violations limit

Violations limit settings

Limit max number of violations.

  • CLI:
    • -m MAX_VIOLATIONS
    • --max-violations MAX_VIOLATIONS
  • YAML:
    • cmdargs.error-limit

       cmdargs:
         error-limit: 10

Default: 50

Format

Format settings

Change human-readable output format.

  • CLI:

    • -f FORMAT
    • --format FORMAT
  • YAML:

    • cmdargs.format

       cmdargs:
         format: '{file_path}:{line_number}:{column_number}: {description}'

Default: '{file_path}:{line_number}:{column_number}: {description} (see {reference})'

Available variables:

  • file_path
  • file_name
  • line_number
  • column_number
  • severity
  • description
  • policy_name
  • reference

Statistics settings

Print statistic like: Total violations: 20.

  • CLI:
    • --stat
  • YAML:
    • cmdargs.stat

       cmdargs:
         stat: true

Default: false

Color settings

Colorize human-readable output.

  • CLI:
    • -c
    • --color
    • --no-color
  • YAML:
    • cmdargs.color

       cmdargs:
         color: true

Default: false

JSON output settings

Print JSON instead of the human-readable output.

  • CLI:
    • -j
    • --json
  • YAML:
    • cmdargs.json

       cmdargs:
         json: true

Default: false