# This file controls the behavior of Trunk: https://docs.trunk.io/cli # To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml version: 0.1 cli: version: 1.21.0 shell_hooks: enforce: true # Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) plugins: sources: - id: trunk ref: v1.4.5 uri: https://github.com/trunk-io/plugins # Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) runtimes: enabled: - go@1.21.0 - node@18.12.1 - python@3.10.8 # This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) lint: disabled: - terrascan enabled: - gitleaks@8.18.2 - actionlint@1.6.27 - checkov@3.2.52 - git-diff-check - hadolint@2.12.0 - markdownlint@0.39.0 - osv-scanner@1.7.0 - prettier@3.2.5 - shellcheck@0.10.0 - shfmt@3.6.0 - trivy@0.50.1 - trufflehog@3.71.0 - yamllint@1.35.1 - php-cs-fixer@0.0.1 ignore: - linters: [markdownlint] paths: - "**/LICENCE.md" - "**/LICENSE.md" - "**/CODE_OF_CONDUCT.md" definitions: - name: php-cs-fixer files: [php] commands: - name: lint output: sarif #parse_regex: "((?P.*):(?P\\d+):(?P\\d+): \\[(?P.*)\\] (?P.*) \\((?P.*)\\))" # matches the parser run output success_codes: [0, 1, 4, 8] cache_results: false run: php-cs-fixer fix --dry-run --format=checkstyle ${target} read_output_from: stdout parser: run: "cs2pr" # - name: format # output: rewrite # success_codes: [0] # run: php-cs-fixer fix -q ${target} # formatter: true # batch: true direct_configs: [.php-cs-fixer.php, .php-cs-fixer.dist.php] #working_directory: ${root_or_parent_with_direct_config} suggest_if: files_present tools: [php-cs-fixer, cs2pr] version_command: parse_regex: ${semver} run: php-cs-fixer --version actions: enabled: - trunk-announce - trunk-check-pre-push - trunk-fmt-pre-commit - trunk-upgrade-available tools: disabled: - composer enabled: - action-validator@0.6.0 - php-cs-fixer@0.0.1 - cs2pr@0.0.1 - jq@jq-1.7.1 - gh@2.47.0 - act@0.2.61 - terraform@1.7.2 definitions: - name: gh download: gh known_good_version: 2.27.0 environment: - name: PATH list: ["${tool}/bin"] shims: [gh] - name: composer download: composer known_good_version: 0.0.1 environment: - name: PATH list: ["${tool}/bin"] shims: [composer] - name: php-cs-fixer download: php-cs-fixer known_good_version: 0.0.1 environment: - name: PATH list: ["${tool}/bin"] shims: [php-cs-fixer] - name: cs2pr download: cs2pr known_good_version: 0.0.1 environment: - name: PATH list: ["${tool}/bin"] shims: [cs2pr] - name: php-static-cli download: php-static-cli known_good_version: 2.0.1 environment: - name: PATH list: ["${tool}/bin"] shims: [spc] downloads: - name: gh downloads: - os: linux: linux cpu: x86_64: amd64 arm_64: arm64 url: https://github.com/cli/cli/releases/download/v${version}/gh_${version}_${os}_${cpu}.tar.gz strip_components: 1 - os: windows: windows cpu: x86_64: amd64 arm_64: arm64 url: https://github.com/cli/cli/releases/download/v${version}/gh_${version}_${os}_${cpu}.zip strip_components: 1 # macOS releases since 2.28.0 started using .zip instead of .tar.gz - os: macos: macOS cpu: x86_64: amd64 arm_64: arm64 url: https://github.com/cli/cli/releases/download/v${version}/gh_${version}_${os}_${cpu}.zip strip_components: 1 version: ">=2.28.0" - os: macos: macOS cpu: x86_64: amd64 arm_64: arm64 url: https://github.com/cli/cli/releases/download/v${version}/gh_${version}_${os}_${cpu}.tar.gz strip_components: 1 - name: composer downloads: - os: linux: linux macos: macos cpu: x86_64: x86_64 arm_64: arm64 url: https://github.com/matthewbaggett/packaged-tooling/releases/download/${version}/composer-8.2-${os}-${cpu} - name: php-cs-fixer downloads: - os: linux: linux macos: macos cpu: x86_64: x86_64 arm_64: arm64 url: https://github.com/matthewbaggett/packaged-tooling/releases/download/${version}/php-cs-fixer-8.2-${os}-${cpu} - name: cs2pr downloads: - os: linux: linux macos: macos cpu: x86_64: x86_64 arm_64: arm64 url: https://github.com/matthewbaggett/packaged-tooling/releases/download/${version}/cs2pr-8.2-${os}-${cpu} - name: php-static-cli downloads: - os: linux: linux macos: macos cpu: x86_64: x86_64 arm_64: aarch64 url: https://github.com/crazywhalecc/static-php-cli/releases/download/${version}/spc-${os}-${cpu}.tar.gz