-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into eli/release
- Loading branch information
Showing
24 changed files
with
506 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
self-hosted-runner: | ||
labels: | ||
- mint | ||
- small | ||
- 2xlarge | ||
- prod | ||
- playwright | ||
- monorepo-amd64-large | ||
- monorepo-amd64-xlarge | ||
- monorepo-amd64-2xlarge | ||
- monorepo-arm64-2xlarge | ||
- public-amd64-2xlarge | ||
- ubuntu-x64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,23 @@ concurrency: | |
jobs: | ||
build_and_test: | ||
name: Cargo Test [linux] | ||
runs-on: ubuntu-latest | ||
runs-on: [self-hosted, ubuntu-x64] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cargo Test | ||
run: cargo test | ||
|
||
trunk_check_runner: | ||
name: Trunk Check runner [linux] | ||
runs-on: ubuntu-latest | ||
runs-on: [self-hosted, ubuntu-x64] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Caching is only needed when using ephemeral CI runners | ||
- name: Cache Linters/Formatters | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/trunk | ||
key: trunk-${{ runner.os }} | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Trunk Check | ||
uses: trunk-io/[email protected] | ||
uses: trunk-io/trunk-action@v1 | ||
with: | ||
cache: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
enable=all | ||
source-path=SCRIPTDIR | ||
disable=SC2154 | ||
|
||
# If you're having issues with shellcheck following source, disable the errors via: | ||
# disable=SC1090 | ||
# disable=SC1091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: trunk-io/trunk setup for trunk check/upgrade | ||
description: Set up | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Build trunk-toolbox | ||
shell: bash | ||
run: cargo build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,79 @@ version: 0.1 | |
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v0.0.6 | ||
ref: v1.4.2 | ||
uri: https://github.com/trunk-io/plugins | ||
runtimes: | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
cli: | ||
version: 1.10.1-beta.25 | ||
version: 1.19.0 | ||
api: | ||
address: api.trunk-staging.io:8443 | ||
|
||
downloads: | ||
- name: trunk-toolbox | ||
version: 0.0.1 | ||
downloads: | ||
- version: 0.0.1 | ||
os: | ||
linux: unknown-linux-gnu | ||
macos: apple-darwin | ||
cpu: | ||
x86_64: x86_64 | ||
arm_64: aarch64 | ||
url: https://github.com/trunk-io/toolbox/releases/download/${version}/trunk-toolbox-${version}-${cpu}-${os}.tar.gz | ||
tools: | ||
definitions: | ||
- name: trunk-toolbox | ||
download: trunk-toolbox | ||
shims: [trunk-toolbox] | ||
known_good_version: 0.0.1 | ||
runtimes: | ||
- rust | ||
lint: | ||
linters: | ||
- name: horton | ||
type: sarif | ||
definitions: | ||
- name: trunk-toolbox | ||
tools: [trunk-toolbox] | ||
files: [ALL] | ||
command: ["${workspace}/target/debug/horton", "--file", "${path}"] | ||
success_codes: [0, 1] | ||
commands: | ||
- name: lint | ||
run: ${workspace}/toolbox-latest --upstream=${upstream-ref} --results=${tmpfile} ${target} | ||
output: sarif | ||
batch: true | ||
success_codes: [0] | ||
read_output_from: tmp_file | ||
disable_upstream: true | ||
version_command: | ||
parse_regex: ${semver} | ||
run: trunk-toolbox --version | ||
environment: | ||
- name: PATH | ||
list: ["${linter}"] | ||
|
||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- git-diff-check | ||
- taplo@0.7.0 | ||
- [email protected].22 | ||
- clippy@1.65.0 | ||
- gitleaks@8.15.2 | ||
- markdownlint@0.32.2 | ||
- prettier@2.8.1 | ||
- rustfmt@1.65.0 | ||
- taplo@0.8.1 | ||
- [email protected].26 | ||
- clippy@1.76.0 | ||
- gitleaks@8.18.2 | ||
- markdownlint@0.39.0 | ||
- prettier@3.2.5 | ||
- rustfmt@1.76.0 | ||
actions: | ||
enabled: | ||
- trunk-upgrade-available | ||
- trunk-announce | ||
- trunk-check-pre-push | ||
- trunk-fmt-pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contribution | ||
|
||
Thanks for contributing to the trunk toolbox! Read on to learn more. | ||
|
||
- [Overview](#overview) | ||
- [Development](#development) | ||
- [Testing](#testing) | ||
- [Guidelines](#guidelines) | ||
- [Docs](https://docs.trunk.io) | ||
|
||
## Overview | ||
|
||
Trunk toolbox is a place for rules that transcend particular languages and are relevant to any code in a repo. | ||
|
||
## Development | ||
|
||
The trunk.yaml in this repo has been modified to run your local iteration of toolbox as you are building. This is managed through the `trunk-latest` script. Effectively as you run `cargo build` or `cargo build release` the script will pick up the last built binary and use that. | ||
|
||
If no local binary has been built then the pinned version in the trunk.yaml will be used. | ||
|
||
## Testing | ||
|
||
`cargo test` will execute the unit and integration tests for the repo | ||
|
||
## Guidelines | ||
|
||
Please follow the guidelines below when contributing: | ||
|
||
- After defining a rule, please add it to [`README.md`](README.md). | ||
- If you run into any problems while defining a rule, feel free to reach out on our | ||
[Slack](https://slack.trunk.io/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[toolchain] | ||
channel = "1.70.0" | ||
channel = "1.76.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.