From 1885cb2772a987d2257b7456c76b06a71f5c8571 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 13:40:20 -0700 Subject: [PATCH 01/10] --- readme.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index fed03f2a0..dd675ae5e 100644 --- a/readme.md +++ b/readme.md @@ -27,11 +27,12 @@ By consolidating and sharing integrations for linters/actions into a single repo ### Enabling a supported linter -| language | linters | -| -------- | --------------------- | -| All | `cspell`, `codespell` | -| C++ | pragma-once | -| SQL | `sqlfluff` | +| language | linters | +| -------- | ------------------------------------------------------------ | +| All | `cspell`, `codespell` | +| C++ | pragma-once | +| SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | +| Go | `[nancy]`(https://github.com/sonatype-nexus-community/nancy) | ```bash trunk check enable {linter} From 2efb2e5aba95880673ed701896af41d7c50c7e04 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 13:41:10 -0700 Subject: [PATCH 02/10] --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index dd675ae5e..bf7cd7c57 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ By consolidating and sharing integrations for linters/actions into a single repo | All | `cspell`, `codespell` | | C++ | pragma-once | | SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | -| Go | `[nancy]`(https://github.com/sonatype-nexus-community/nancy) | +| Go | `[nancy](https://github.com/sonatype-nexus-community/nancy)` | ```bash trunk check enable {linter} From 574096192ede789036e47799d0979a3d80bf0154 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 13:41:43 -0700 Subject: [PATCH 03/10] --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index bf7cd7c57..8095decb5 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ By consolidating and sharing integrations for linters/actions into a single repo | All | `cspell`, `codespell` | | C++ | pragma-once | | SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | -| Go | `[nancy](https://github.com/sonatype-nexus-community/nancy)` | +| Go | [nancy](https://github.com/sonatype-nexus-community/nancy) | ```bash trunk check enable {linter} From 0c9fd062dcc384ee58aab311ef6aa51c77dc7c8a Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 13:41:58 -0700 Subject: [PATCH 04/10] --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 8095decb5..939739dd0 100644 --- a/readme.md +++ b/readme.md @@ -27,11 +27,11 @@ By consolidating and sharing integrations for linters/actions into a single repo ### Enabling a supported linter -| language | linters | -| -------- | ------------------------------------------------------------ | -| All | `cspell`, `codespell` | -| C++ | pragma-once | -| SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | +| language | linters | +| -------- | ---------------------------------------------------------- | +| All | `cspell`, `codespell` | +| C++ | pragma-once | +| SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | | Go | [nancy](https://github.com/sonatype-nexus-community/nancy) | ```bash From 13e9e84eb39cd28917dd9c72b5aab5f5ccb46059 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 14:00:11 -0700 Subject: [PATCH 05/10] --- .trunk/trunk.yaml | 13 +++++++------ linters/pragma-once/readme.md | 3 +++ readme.md | 12 ++++++------ 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 linters/pragma-once/readme.md diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 6ed53aedd..84f38c4e9 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -4,7 +4,7 @@ cli: plugins: sources: - id: trunk - ref: v0.0.5 + ref: v0.0.6 uri: https://github.com/trunk-io/plugins runtimes: enabled: @@ -13,21 +13,21 @@ runtimes: - python@3.10.3 lint: enabled: - - actionlint@1.6.21 + - actionlint@1.6.22 - black@22.10.0 - - cspell@6.12.0 + - cspell@6.13.3 - flake8@5.0.4: packages: - - flake8-bugbear@22.9.23 + - flake8-bugbear@22.10.27 - git-diff-check@SYSTEM - gitleaks@8.15.0 - isort@5.10.1 - markdownlint@0.32.2 - prettier@2.7.1 - - semgrep@0.118.0 + - semgrep@0.120.0 - shellcheck@0.8.0 - shfmt@3.5.0 - - sqlfluff@1.3.2 + - sqlfluff@1.4.1 - yamllint@1.28.0 actions: definitions: @@ -55,6 +55,7 @@ actions: - files: - .trunk/cspell-words.txt enabled: + - trunk-announce - sort-dictionary - toggle-local - trunk-cache-prune diff --git a/linters/pragma-once/readme.md b/linters/pragma-once/readme.md new file mode 100644 index 000000000..1caf3c927 --- /dev/null +++ b/linters/pragma-once/readme.md @@ -0,0 +1,3 @@ +# pragma-once + +Formatter that ensures every header file begins with `#pragma once` diff --git a/readme.md b/readme.md index 939739dd0..da35db311 100644 --- a/readme.md +++ b/readme.md @@ -27,12 +27,12 @@ By consolidating and sharing integrations for linters/actions into a single repo ### Enabling a supported linter -| language | linters | -| -------- | ---------------------------------------------------------- | -| All | `cspell`, `codespell` | -| C++ | pragma-once | -| SQL | `[sqlfluff]`(https://github.com/sqlfluff/sqlfluff) | -| Go | [nancy](https://github.com/sonatype-nexus-community/nancy) | +| language | linters | +| -------- | ------------------------------------------------------------------------------------------------------------------- | +| All | [cspell](https://github.com/streetsidesoftware/cspell), [codespell](https://github.com/codespell-project/codespell) | +| C++ | [pragma-once](linters/pragma-once/readme.md) | +| SQL | [sqlfluff](https://github.com/sqlfluff/sqlfluff), [sqlfmt](https://github.com/tconbeer/sqlfmt) | +| Security | [nancy](https://github.com/sonatype-nexus-community/nancy), [trivy](https://github.com/aquasecurity/trivy) | ```bash trunk check enable {linter} From eb093be4d20ac0a855cdf1709d743fd12cd536f4 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 14:07:30 -0700 Subject: [PATCH 06/10] --- actions/buf/readme.md | 3 +++ readme.md | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 actions/buf/readme.md diff --git a/actions/buf/readme.md b/actions/buf/readme.md new file mode 100644 index 000000000..292b1cf5d --- /dev/null +++ b/actions/buf/readme.md @@ -0,0 +1,3 @@ +# buf-gen + +Generates files from `.proto` files using [`buf`](https://buf.build) whenever protobuf files change. **Must** have a `buf.gen.yaml` and `buf.work.yaml` (if running from project root) diff --git a/readme.md b/readme.md index da35db311..5962aa48a 100644 --- a/readme.md +++ b/readme.md @@ -21,7 +21,7 @@ ### Welcome -This repository is the official, managed repository for integration actions and linters into trunk. It is imported by default in all trunk configurations (since v0.17.0-beta). +This repository is the official, managed repository for integration actions and linters into trunk. It is imported by default in all trunk configurations. By consolidating and sharing integrations for linters/actions into a single repository we hope to make the discovery, management and integration of new tools as straight-forward as possible. @@ -40,10 +40,10 @@ trunk check enable {linter} ### Enabling a supported action -| action | description | -| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| commitlint | [`commitlint`](https://github.com/conventional-changelog/commitlint) checks if your commit messages meet the conventional commit format. | -| buf-gen | generates files from `.proto` files using [`buf`](https://buf.build) whenever protobuf files change. **Must** have a `buf.gen.yaml` and `buf.work.yaml` (if running from project root) | +| action | description | +| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| commitlint | [`commitlint`](https://github.com/conventional-changelog/commitlint) checks if your commit messages meet the conventional commit format. | +| buf-gen | [`buf-gen`](actions/buf/readme.md) | ```bash trunk actions enable {action} From 4b7b913582b4960027c94e11bf4f6255c65b348f Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 14:49:05 -0700 Subject: [PATCH 07/10] --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 5962aa48a..8bf9e1abc 100644 --- a/readme.md +++ b/readme.md @@ -40,10 +40,10 @@ trunk check enable {linter} ### Enabling a supported action -| action | description | -| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| commitlint | [`commitlint`](https://github.com/conventional-changelog/commitlint) checks if your commit messages meet the conventional commit format. | -| buf-gen | [`buf-gen`](actions/buf/readme.md) | +| action | description | +| -------------------------------------------------------------------- | ---------------------------------------------------------- | +| [`commitlint`](https://github.com/conventional-changelog/commitlint) | Enforce conventional commit message for your local commits | +| [`buf-gen`](actions/buf/readme.md) | Run `buf` on .proto file change | ```bash trunk actions enable {action} From 91f5c3d22fd783dad60fa442f0fcf7baa3d927f9 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 14:54:16 -0700 Subject: [PATCH 08/10] --- actions/go-mod-tidy-vendor/readme.md | 3 +++ actions/go-mod-tidy/readme.md | 3 +++ readme.md | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 actions/go-mod-tidy-vendor/readme.md create mode 100644 actions/go-mod-tidy/readme.md diff --git a/actions/go-mod-tidy-vendor/readme.md b/actions/go-mod-tidy-vendor/readme.md new file mode 100644 index 000000000..b43ce361c --- /dev/null +++ b/actions/go-mod-tidy-vendor/readme.md @@ -0,0 +1,3 @@ +# go-mod-tidy-vendor + +Run `go mod tidy` followed by `go mod vendor` whenever go.mod file is modified diff --git a/actions/go-mod-tidy/readme.md b/actions/go-mod-tidy/readme.md new file mode 100644 index 000000000..1e94db18d --- /dev/null +++ b/actions/go-mod-tidy/readme.md @@ -0,0 +1,3 @@ +# go-mod-tidy + +Run `go mod tidy` whenever go.mod file is modified diff --git a/readme.md b/readme.md index 8bf9e1abc..4e8cace51 100644 --- a/readme.md +++ b/readme.md @@ -42,8 +42,10 @@ trunk check enable {linter} | action | description | | -------------------------------------------------------------------- | ---------------------------------------------------------- | -| [`commitlint`](https://github.com/conventional-changelog/commitlint) | Enforce conventional commit message for your local commits | -| [`buf-gen`](actions/buf/readme.md) | Run `buf` on .proto file change | +| [`buf-gen`](actions/buf/readme.md) | run `buf` on .proto file change | +| [`commitlint`](https://github.com/conventional-changelog/commitlint) | enforce conventional commit message for your local commits | +| [`go-mod-tidy`](actions/go-mod-tidy/readme.md) | automatically tidy go.mod file | +| [`go-mod-tidy-vendor`](actions/go-mod-tidy-vendor/readme.md) | automatically tidy and vendor go.mod file | ```bash trunk actions enable {action} From 47c4db021b68749f6a46d568c312c20c4d6c1d99 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 15:11:19 -0700 Subject: [PATCH 09/10] --- .trunk/trunk.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 84f38c4e9..1f96f9195 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -6,6 +6,7 @@ plugins: - id: trunk ref: v0.0.6 uri: https://github.com/trunk-io/plugins + local: /home/eli/Github/plugins runtimes: enabled: - go@1.18.3 From ee307fca82e8bb774a386d5dce02a3eae96374f6 Mon Sep 17 00:00:00 2001 From: Eli Schleifer Date: Wed, 2 Nov 2022 15:11:46 -0700 Subject: [PATCH 10/10] --- .trunk/trunk.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 1f96f9195..84f38c4e9 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -6,7 +6,6 @@ plugins: - id: trunk ref: v0.0.6 uri: https://github.com/trunk-io/plugins - local: /home/eli/Github/plugins runtimes: enabled: - go@1.18.3