Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme so all linters and actions are properly described #44

Merged
merged 10 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -13,21 +13,21 @@ runtimes:
- [email protected]
lint:
enabled:
- [email protected].21
- [email protected].22
- [email protected]
- cspell@6.12.0
- cspell@6.13.3
- [email protected]:
packages:
- flake8-bugbear@22.9.23
- flake8-bugbear@22.10.27
- git-diff-check@SYSTEM
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- semgrep@0.118.0
- semgrep@0.120.0
- [email protected]
- [email protected]
- sqlfluff@1.3.2
- sqlfluff@1.4.1
- [email protected]
actions:
definitions:
Expand Down Expand Up @@ -55,6 +55,7 @@ actions:
- files:
- .trunk/cspell-words.txt
enabled:
- trunk-announce
- sort-dictionary
- toggle-local
- trunk-cache-prune
Expand Down
3 changes: 3 additions & 0 deletions actions/buf/readme.md
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions actions/go-mod-tidy-vendor/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# go-mod-tidy-vendor

Run `go mod tidy` followed by `go mod vendor` whenever go.mod file is modified
3 changes: 3 additions & 0 deletions actions/go-mod-tidy/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# go-mod-tidy

Run `go mod tidy` whenever go.mod file is modified
3 changes: 3 additions & 0 deletions linters/pragma-once/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pragma-once

Formatter that ensures every header file begins with `#pragma once`
23 changes: 13 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,31 @@

### 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.

### Enabling a supported linter

| language | linters |
| -------- | --------------------- |
| All | `cspell`, `codespell` |
| C++ | pragma-once |
| SQL | `sqlfluff` |
| 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}
```

### 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 |
| -------------------------------------------------------------------- | ---------------------------------------------------------- |
| [`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}
Expand Down