LogoLogo
SlackLogin
  • Overview
    • Welcome
  • Setup & Configuration
    • Connecting to Trunk
    • Managing Your Organization
      • GitHub App Permissions
  • Integration with Slack
  • Flaky Tests (Beta)
    • Overview
    • Get Started
      • Test Frameworks
        • Android
        • Bazel
        • Behave
        • cargo-nextest
        • Cypress
        • Dart Test
        • Go
        • GoogleTest
        • Gradle
        • Jasmine
        • Jest
        • Karma
        • Maven
        • minitest
        • Mocha
        • Nightwatch
        • NUnit
        • Pest
        • PHPUnit
        • Playwright
        • Pytest
        • Robot Framework
        • RSpec
        • Swift Testing
        • Vitest
        • XCTest
        • Other Test Frameworks
      • CI Providers
        • Azure DevOps Pipelines
        • BitBucket Pipelines
        • Buildkite
        • CircleCI
        • Drone CI
        • GitHub Actions
        • GitLab
        • Jenkins
        • Semaphore CI
        • TeamCity
        • Travis CI
        • Other CI Providers
    • Dashboard
    • Flaky Test Detection
    • Quarantining
    • PR Comments
    • Ticketing Integrations
      • Jira Integration
      • Linear Integration
      • Other Ticketing Platforms
    • Webhooks
      • Slack Integration
      • Microsoft Teams Integration
      • GitHub Issues Integration
      • Linear Integration
    • Uploader CLI Reference
  • Merge Queue
    • Overview
    • How does it work?
    • Setup
      • Quick Start
      • Settings
      • Integration for Slack
    • Concepts and Optimizations
      • Predictive Testing
      • Optimistic Merging
      • Pending Failure Depth
      • Anti-Flake Protection
      • Batching
      • Parallel Queues
        • Bazel
        • Nx
        • API
      • FAQ
    • Priority
    • Managing Merge Queue
      • Using the Merge UI
      • Metrics
      • Command Line
    • Webhooks
    • Reference
  • Code Quality
    • Overview
    • Why Metalinters?
      • How does it work?
      • Why Code Quality?
    • Setup & Installation
      • Initialize Trunk
      • Local Linting
      • Linting in CI
      • Nightly Report (Deprecated)
    • IDE Integration
      • VSCode
      • Neovim
      • GitHub Codespaces
    • Linters
      • Supported Linters
        • Actionlint
        • Ansible-lint
        • Autopep8
        • Bandit
        • Biome
        • Black
        • Brakeman
        • buf
        • Buildifier
        • cfnlint
        • Checkov
        • circleci
        • ClangFormat
        • clang-tidy
        • Clippy
        • cmake-format
        • codespell
        • cspell
        • cue-fmt
        • dart
        • deno
        • Detekt
        • djlint
        • dotenv-linter
        • dotnet-format
        • dustilock
        • ESLint
        • Flake8
        • git-diff-check
        • Gitleaks
        • Gofmt
        • gofumpt
        • goimports
        • gokart
        • golangci-lint
        • golines
        • google-java-format
        • graphql-schema-linter
        • hadolint
        • haml-lint
        • isort
        • iwyu
        • ktlint
        • kube-linter
        • markdown-link-check
        • markdown-table-prettify
        • Markdownlint
        • markdownlint-cli2
        • mypy
        • nancy
        • nixpkgs-fmt
        • opa
        • OSV-Scanner
        • Oxipng
        • perlcritic
        • perltidy
        • php-cs-fixer
        • phpstan
        • pmd
        • pragma-once
        • pre-commit-hooks
        • Prettier
        • prisma
        • psscriptanalyzer
        • Pylint
        • pyright
        • regal
        • remark-lint
        • renovate
        • rome
        • rubocop
        • Ruff
        • rufo
        • rustfmt
        • scalafmt
        • semgrep
        • ShellCheck
        • shfmt
        • sort-package-json
        • sourcery
        • sql-formatter
        • SQLFluff
        • sqlfmt
        • squawk
        • standardrb
        • stringslint
        • stylelint
        • stylua
        • SVGO
        • swiftformat
        • swiftlint
        • taplo
        • Terraform
        • terragrunt
        • terrascan
        • TFLint
        • tfsec
        • tofu
        • Trivy
        • Trufflehog
        • txtpbfmt
        • vale
        • Yamllint
        • yapf
      • Run Linters
      • Manage Linters
      • Configure Linters
      • Ignoring Issues and Files
      • Custom Linters
      • Shared Configs
      • Upgrades
    • Debugging
    • Licensing
  • CLI & API References
    • CLI Reference
      • Install
      • Getting Started
        • Code Quality
        • Merge Queue
        • Flaky Tests
        • Tools
        • Actions
          • Git Hooks
        • Announce
      • Compatibility
      • Caching
      • Commands Reference
        • Code Quality
        • Actions
        • Merge
      • Configuration
        • Plugins
          • Share Config Between Codebases
          • Exporting Linter Configs
        • Runtimes
        • Tools
        • Lint
          • Definitions
          • Commands
          • Output
          • Output Parsing
          • Files and Caching
          • Dependencies
          • Auto-Enable
        • Actions
          • Notifications
          • Logging and Troubleshooting
        • Merge
        • Telemetry
        • Per User Overrides
    • API Reference
      • Flaky Tests
      • Merge Queue
      • Webhooks Reference
  • Pricing & Security
    • Security
  • Billing
  • Community & Support
  • Links
    • Open App
    • Slack Community
    • Changelog
    • Feature Requests
On this page
  • affects_cache
  • allow_empty_files
  • batch
  • commands
  • deprecated
  • direct_configs
  • disabled
  • download
  • enabled
  • environment
  • extra_packages
  • formatter
  • good_without_config
  • hold_the_line
  • include_lfs
  • include_scanner_type
  • issue_url_format
  • known_good_version
  • known_bad_versions
  • main_tool
  • name
  • package
  • path_format
  • plugin_url
  • prepare_command
  • query_compile_commands
  • runtime
  • run_timeout
  • suggest_if
  • supported_platforms
  • tools
  • version_command
  • verbatim_message
Edit on GitHub
  1. CLI & API References
  2. CLI Reference
  3. Configuration
  4. Lint

Definitions

Last updated 3 months ago

The definition of a particular linter is put under lint.definitions. The following properties define the settings of a particular linter, not for all linters. For global linter settings, see .

affects_cache

affects_cache: The list of files that affect the cache results of this linter. .

allow_empty_files

allow_empty_files: optional boolean. Indicates to skip linting empty files for this linter.

batch

batch: optional boolean. Combine multiple files into the same execution.

commands

commands: The list of commands exposed by this linter. See .

deprecated

deprecated: string. Indicates the linter is deprecated and should not be used.

direct_configs

disabled

disabled: optional boolean: Whether linter is actively disabled (and will not be recommended) and will not run (overrides enabled).

download

enabled

enabled: optional boolean. Whether this linter is enabled.

environment

extra_packages

formatter

formatter: boolean. Indicates whether this is a formatter and should be included in trunk fmt.

good_without_config

hold_the_line

include_lfs

include_scanner_type

include_scanner_type: which include scanner to use, if any.

issue_url_format

issue_url_format: string, a format string that accepts issue codes for links to issues docs.

known_good_version

known_good_version: string. A version to be used when Trunk cannot query the latest version. Currently, Trunk can query the latest version for all package managers and downloads hosted on GitHub.

known_bad_versions

known_bad_versions: string list. Versions of a linter that are known to be broken and should not be run with Trunk. We will fall back to a known_good_version if init or upgrade chooses something in this set.

main_tool

main_tool, string. If your linter depends on more than a single tool, and none of the tools has the same name as the linter, then you will need to specify which is the main tool here. It will be used to version the tool from the linter's enabled version.

name

name required string. The name of the linter. This property will be used to refer to the linter in other parts of the config, for example, in the list of enabled linters.

package

path_format

path_format, Whether to use the platform-specific paths or generic "/". Default native.

plugin_url

plugin_url: string, a plugin url for reporting issues.

prepare_command

prepare_command. A command that is run once per session before linting any number of files using this linter. ex. [tflint, --init].

query_compile_commands

query_compile_commands, optional boolean.

runtime

run_timeout

suggest_if

supported_platforms

tools

version_command

version_command: Version check commands.

verbatim_message

verbatim_message: Do not try to truncate or reflow the output of this linter.

direct_configs: string list. Indicates config files used to auto-enable the linter. See .

download: string. The download URL. You must provide either runtime + packages or download, not both. Using runtimes is preferred. See .

environment: a list of runtime variables used when running the linter. See .

extra_packages: list of strings, Extra packages to install, versions are optional. See .

good_without_config: optional boolean. Indicates whether this linter is recommended without the user tuning its configuration. Prefer .

hold_the_line: optional boolean. Whether be done for this linter or not.

include_lfs: boolean. Allow this linter to operate on files tracked using .

package: string, What primary package to install, if using a package manager runtime. The enabled version of the runtime for this linter will apply to this package. See .

runtime: RuntimeType, Which package manager runtime, if any, to require to be setup for this linter. Ex: node, ruby, python. See .

run_timeout: duration string. Describes how long a linter can run before timing out. .

How to determine if this linter should be auto-enabled/recommended. Possible values are never, config_present, and files_present. for more details.

Platform constraint. If incompatible, renders a notice. See also .

tools, string list. The list of tools used by this linter. See .

Lint Config
See Caching
Linter Command Definition
Auto Enabling
Runtimes
Linter Dependencies
git LFS
Linter Dependencies
Linter Dependencies
See auto-enabling
Linter Dependencies
suggest_if
hold-the-line will
Command Environment Variables
Command platforms
See timeouts