Skip to content

Commit

Permalink
add trunk yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryang20718 committed May 19, 2024
1 parent 69cee89 commit 4e642d6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data/

# misc.
*.yaml
!trunk.yaml
!dummy_account.yaml
!dummy_account_copy.yaml
package-lock.json
Expand All @@ -30,4 +31,4 @@ package-lock.json

*.log
env
save
save
50 changes: 50 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e642d6

Please sign in to comment.