Skip to content

Commit

Permalink
perlcritic, stringslint, swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJang27 committed Jan 4, 2024
1 parent 6e1cf12 commit 286a545
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
12 changes: 12 additions & 0 deletions linters/perlcritic/test_data/perlcritic_basic.check.shot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Testing linter perlcritic test basic 1`] = `
"code": "TestingAndDebugging::RequireUseStrict",
"column": "3",
"file": "test_data/basic.in.pl",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "3",
"linter": "perlcritic",
Expand All @@ -17,6 +18,7 @@ exports[`Testing linter perlcritic test basic 1`] = `
"code": "TestingAndDebugging::RequireUseWarnings",
"column": "3",
"file": "test_data/basic.in.pl",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "3",
"linter": "perlcritic",
Expand All @@ -34,6 +36,16 @@ exports[`Testing linter perlcritic test basic 1`] = `
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "perl",
"linter": "perlcritic",
"paths": [
"test_data/basic.in.pl",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
Expand Down
4 changes: 2 additions & 2 deletions linters/sourcery/sourcery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ lint:`,
);
driver.writeFile(trunkYamlPath, newContents);

// TODO(Tyler): Sourcery relies on checking if the repo is open source for its pricing model.
// The sandbox tests run on a subset of the main repo, and it neesd access to the repo root .git folder in order to run.
// NOTE(Tyler): Sourcery relies on checking if the repo is open source for its pricing model.
// The sandbox tests run on a subset of the main repo, and it needs access to the repo root .git folder in order to run.
driver.deleteFile(".git");
// trunk-ignore(semgrep): This path is safe.
fs.symlinkSync(path.join(REPO_ROOT, ".git"), path.join(driver.getSandbox(), ".git"));
Expand Down
23 changes: 23 additions & 0 deletions linters/stringslint/test_data/stringslint_v0.1.1_CUSTOM.check.shot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Testing linter stringslint test CUSTOM 1`] = `
"code": "missing_comment",
"column": "1",
"file": "test_data/Localizable.strings",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "1",
"linter": "stringslint",
Expand All @@ -17,6 +18,7 @@ exports[`Testing linter stringslint test CUSTOM 1`] = `
"code": "unused",
"column": "1",
"file": "test_data/Localizable.strings",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "1",
"linter": "stringslint",
Expand All @@ -27,6 +29,7 @@ exports[`Testing linter stringslint test CUSTOM 1`] = `
"code": "missing",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "3",
"linter": "stringslint",
Expand All @@ -52,6 +55,26 @@ exports[`Testing linter stringslint test CUSTOM 1`] = `
"test_data/basic.swift",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "strings",
"linter": "stringslint",
"paths": [
"test_data/Localizable.strings",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "swift",
"linter": "stringslint",
"paths": [
"test_data/basic.swift",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
Expand Down
14 changes: 14 additions & 0 deletions linters/swiftlint/test_data/swiftlint_v0.49.1_basic.check.shot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "type_name",
"column": "8",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "1",
"linter": "swiftlint",
Expand All @@ -17,6 +18,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "line_length",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "3",
"linter": "swiftlint",
Expand All @@ -27,6 +29,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "vertical_whitespace",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "5",
"linter": "swiftlint",
Expand All @@ -37,6 +40,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "identifier_name",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "6",
"linter": "swiftlint",
Expand All @@ -54,6 +58,16 @@ exports[`Testing linter swiftlint test basic 1`] = `
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "swift",
"linter": "swiftlint",
"paths": [
"test_data/basic.swift",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
Expand Down
14 changes: 14 additions & 0 deletions linters/swiftlint/test_data/swiftlint_v0.51.0_basic.check.shot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "type_name",
"column": "8",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "1",
"linter": "swiftlint",
Expand All @@ -17,6 +18,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "line_length",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "3",
"linter": "swiftlint",
Expand All @@ -27,6 +29,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "vertical_whitespace",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_MEDIUM",
"line": "5",
"linter": "swiftlint",
Expand All @@ -37,6 +40,7 @@ exports[`Testing linter swiftlint test basic 1`] = `
"code": "identifier_name",
"column": "1",
"file": "test_data/basic.swift",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "6",
"linter": "swiftlint",
Expand All @@ -54,6 +58,16 @@ exports[`Testing linter swiftlint test basic 1`] = `
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "swift",
"linter": "swiftlint",
"paths": [
"test_data/basic.swift",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
Expand Down

0 comments on commit 286a545

Please sign in to comment.