Skip to content

Commit

Permalink
Toolbox defintion and version number updates (#912)
Browse files Browse the repository at this point in the history
1. Toolbox supports caching so better to take advantage of that
2. Revs to latest release version of toolbox
  • Loading branch information
EliSchleifer authored Nov 12, 2024
1 parent 2fcbf62 commit b4922de
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 3 deletions.
19 changes: 16 additions & 3 deletions linters/trunk-toolbox/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.1

downloads:
- name: trunk-toolbox
version: 0.5.0
version: 0.5.3
downloads:
- os:
linux: unknown-linux-gnu
Expand All @@ -17,7 +17,7 @@ tools:
- name: trunk-toolbox
download: trunk-toolbox
shims: [trunk-toolbox]
known_good_version: 0.5.0
known_good_version: 0.5.3
lint:
definitions:
- name: trunk-toolbox
Expand All @@ -27,15 +27,28 @@ lint:
affects_cache: [toolbox.toml, log4rs.yaml]
commands:
- name: lint
version: ">=0.4.1"
version: ">=0.5.3"
run:
trunk-toolbox --upstream=${upstream-ref} --cache-dir=${cachedir} --results=${tmpfile}
${target}
output: sarif
batch: true
success_codes: [0]
read_output_from: tmp_file
cache_results: true
disable_upstream: false
direct_configs: [toolbox.toml]
max_concurrency: 1
- name: lint
version: ">=0.4.1"
run:
trunk-toolbox --upstream=${upstream-ref} --cache-dir=${cachedir} --results=${tmpfile}
${target}
output: sarif
batch: true
success_codes: [0]
read_output_from: tmp_file
disable_upstream: true
direct_configs: [toolbox.toml]
max_concurrency: 1
- name: lint
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Testing linter trunk-toolbox test do_not_land 1`] = `
{
"issues": [
{
"code": "do-not-land",
"column": "3",
"file": "test_data/do_not_land.in.txt",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "1",
"linter": "trunk-toolbox",
"message": "Found 'DONOTLAND'",
"ranges": [
{
"filePath": "test_data/do_not_land.in.txt",
"length": "9",
"offset": "2",
},
],
"targetType": "ALL",
},
{
"code": "do-not-land",
"column": "3",
"file": "test_data/do_not_land.in.txt",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "2",
"linter": "trunk-toolbox",
"message": "Found 'do-not-land'",
"ranges": [
{
"filePath": "test_data/do_not_land.in.txt",
"length": "11",
"offset": "14",
},
],
"targetType": "ALL",
},
{
"code": "do-not-land",
"column": "3",
"file": "test_data/do_not_land.in.txt",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "3",
"linter": "trunk-toolbox",
"message": "Found 'do_not_land'",
"ranges": [
{
"filePath": "test_data/do_not_land.in.txt",
"length": "11",
"offset": "28",
},
],
"targetType": "ALL",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "ALL",
"linter": "trunk-toolbox",
"paths": [
"test_data/do_not_land.in.txt",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "ALL",
"linter": "trunk-toolbox",
"paths": [
"test_data/do_not_land.in.txt",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;

0 comments on commit b4922de

Please sign in to comment.