diff --git a/linters/trunk-toolbox/plugin.yaml b/linters/trunk-toolbox/plugin.yaml index a2ff5097b..219e4a5c1 100644 --- a/linters/trunk-toolbox/plugin.yaml +++ b/linters/trunk-toolbox/plugin.yaml @@ -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 @@ -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 @@ -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 diff --git a/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot b/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot new file mode 100644 index 000000000..293b5fc21 --- /dev/null +++ b/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot @@ -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": [], +} +`;