From 32baefc0f2692601d60e1b627326392cae214697 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sat, 12 Oct 2024 13:19:57 -0600 Subject: [PATCH] feat: setup trunk --- .trunk/.gitignore | 9 ++++++ .trunk/configs/.isort.cfg | 2 ++ .trunk/configs/.markdownlint.yaml | 0 .trunk/configs/.yamllint.yaml | 10 +++++++ .trunk/configs/ruff.toml | 5 ++++ .trunk/trunk.yaml | 47 +++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+) create mode 100644 .trunk/.gitignore create mode 100644 .trunk/configs/.isort.cfg create mode 100644 .trunk/configs/.markdownlint.yaml create mode 100644 .trunk/configs/.yamllint.yaml create mode 100644 .trunk/configs/ruff.toml create mode 100644 .trunk/trunk.yaml diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..15966d0 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,9 @@ +*out +*logs +*actions +*notifications +*tools +plugins +user_trunk.yaml +user.yaml +tmp diff --git a/.trunk/configs/.isort.cfg b/.trunk/configs/.isort.cfg new file mode 100644 index 0000000..b9fb3f3 --- /dev/null +++ b/.trunk/configs/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +profile=black diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..e69de29 diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml new file mode 100644 index 0000000..4d44466 --- /dev/null +++ b/.trunk/configs/.yamllint.yaml @@ -0,0 +1,10 @@ +rules: + quoted-strings: + required: only-when-needed + extra-allowed: ["{|}"] + empty-values: + forbid-in-block-mappings: true + forbid-in-flow-mappings: true + key-duplicates: {} + octal-values: + forbid-implicit-octal: true diff --git a/.trunk/configs/ruff.toml b/.trunk/configs/ruff.toml new file mode 100644 index 0000000..346b1d9 --- /dev/null +++ b/.trunk/configs/ruff.toml @@ -0,0 +1,5 @@ +# Generic, formatter-friendly config. +select = ["B", "D3", "D4", "E", "F"] + +# Never enforce `E501` (line length violations). This should be handled by formatters. +ignore = ["E501"] diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..ab5c66c --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,47 @@ +version: 0.1 +cli: + version: 1.22.5 + +plugins: + sources: + - id: trunk + ref: v1.6.2 + uri: https://github.com/trunk-io/plugins + +lint: + enabled: + # - bandit@1.7.5 + # - trivy@0.50.1 + - ruff@0.6.7 + - actionlint@1.7.2 + - git-diff-check + - markdownlint@0.42.0 + - osv-scanner@1.8.5 + - prettier@3.3.3 + - taplo@0.9.3 + - trufflehog@3.82.2 + - yamllint@1.35.1 + - black@24.8.0 + # - flake8@7.0.0 + - gitleaks@8.19.2 + - isort@5.13.2 + disabled: + - checkov + - bandit + ignore: + - linters: [ruff] + paths: + - "*.ipynb" + +runtimes: + enabled: + - go@1.21.0 + - node@18.12.1 + - python@3.10.8 + +actions: + enabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + - trunk-upgrade-available