kongctl lint

Uses: kongctl
Related Documentation
Incompatible with
on-prem

Lint configuration.

Command usage

Usage:
  kongctl lint [flags]

Aliases:
  lint, li

Examples:
  # Lint a single file
  kongctl lint -f config.yaml -r ruleset.yaml
  
  # Lint all YAML files in a directory
  kongctl lint -f ./configs/ -r ruleset.yaml
  
  # Lint recursively with JSON output
  kongctl lint -f ./configs/ -R -r ruleset.yaml --output json
  
  # Only show errors (not warnings/info/hints)
  kongctl lint -f config.yaml -r ruleset.yaml --fail-severity error -D
  
  # Fail on warnings and above
  kongctl lint -f config.yaml -r ruleset.yaml --fail-severity warn
  
  # Read from stdin
  cat config.yaml | kongctl lint -f - -r ruleset.yaml


Flags:
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 3024_day, 3024_night, aardvark_blue, abernathy ]
                                - Reference  : [ https://github.com/lrstanley/bubbletint/blob/master/DEFAULT_TINTS.md ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -D, --display-only-failures   Only output results with severity equal to or greater than --fail-severity
  -F, --fail-severity string    Results of this severity or above will trigger a failure exit code. Allowed: [ error | warn | info | hint ] (default "error")
  -f, --filename strings        Input file(s) or directory to lint. Use '-' to read from stdin.
  -h, --help                    help for lint
      --log-file string         Write execution logs to the specified file instead of STDERR.
                                - Config path: [ log-file ]
      --log-level string        Configures the logging level. Execution logs are written to STDERR.
                                - Config path: [ log-level ]
                                - Allowed    : [ trace|debug|info|warn|error ] (default "error")
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
  -p, --profile string          Specify the profile to use for this command. (default "default")
  -R, --recursive               Process the directory used in -f, --filename recursively
  -r, --ruleset string          Path to a Spectral-compatible linting ruleset file (YAML or JSON)
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!