From 4e642d6828bb6fb00543b9e7db08a5153773e644 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 May 2024 10:56:14 -0700 Subject: [PATCH] add trunk yaml --- .gitignore | 3 ++- .trunk/trunk.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .trunk/trunk.yaml diff --git a/.gitignore b/.gitignore index 0835755b..07d39c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ data/ # misc. *.yaml +!trunk.yaml !dummy_account.yaml !dummy_account_copy.yaml package-lock.json @@ -30,4 +31,4 @@ package-lock.json *.log env -save \ No newline at end of file +save diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 00000000..5a6bf0dc --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,50 @@ +# 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.22.1 +# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) +plugins: + sources: + - id: trunk + ref: v1.5.0 + uri: https://github.com/trunk-io/plugins +# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) +runtimes: + enabled: + - node@18.12.1 + - python@3.10.8 +# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) +lint: + enabled: + - ruff@0.4.3: + commands: [lint, format] + definitions: + - name: ruff + commands: + - name: lint + output: rewrite + run: ruff check --fix --preview ${target} + success_codes: [0] + batch: true + in_place: true + allow_empty_files: false + cache_results: false # there are issues when ruff.toml is modified and checks are not rerun + formatter: true + - name: format + output: rewrite + run: ruff format --line-length=120 ${target} + success_codes: [0] + batch: true + in_place: true + allow_empty_files: false + cache_results: true + formatter: true + enabled: false +actions: + disabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + enabled: + - trunk-upgrade-available