From ac6482d634601a275f3b5943719bc3491f09ff60 Mon Sep 17 00:00:00 2001 From: TylerJang27 <42743566+TylerJang27@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:37:08 +0000 Subject: [PATCH] Auto add snapshots --- .../golangci_lint_v1.63.4_all.check.shot | 79 +++++++++++++++++++ .../golangci_lint_v1.63.4_empty.check.shot | 55 +++++++++++++ ...langci_lint_v1.63.4_unbuildable.check.shot | 31 ++++++++ 3 files changed, 165 insertions(+) create mode 100644 linters/golangci-lint/test_data/golangci_lint_v1.63.4_all.check.shot create mode 100644 linters/golangci-lint/test_data/golangci_lint_v1.63.4_empty.check.shot create mode 100644 linters/golangci-lint/test_data/golangci_lint_v1.63.4_unbuildable.check.shot diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.63.4_all.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_all.check.shot new file mode 100644 index 000000000..4cfb4238c --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_all.check.shot @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test all 1`] = ` +{ + "issues": [ + { + "code": "godot", + "column": "1", + "file": "test_data/basic.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "golangci-lint", + "message": "Comment should end in a period", + "targetType": "go", + }, + { + "code": "errcheck", + "column": "12", + "file": "test_data/basic.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "golangci-lint", + "message": "Error return value of \`time.Parse\` is not checked", + "targetType": "go", + }, + { + "code": "unused", + "column": "6", + "file": "test_data/unused_func.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "golangci-lint", + "message": "func \`helper\` is unused", + "targetType": "go", + }, + { + "code": "typecheck", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.63.4_empty.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_empty.check.shot new file mode 100644 index 000000000..08f295adc --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_empty.check.shot @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test empty 1`] = ` +{ + "issues": [ + { + "code": "typecheck", + "column": "1", + "file": "test_data/empty.go", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": "expected 'package', found 'EOF'", + "targetType": "go", + }, + { + "code": "typecheck", + "file": "test_data/wrapper/printer.go", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://golangci-lint.run/usage/linters/", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "golangci-lint", + "message": ": # golangcilint_linter_test/wrapper +wrapper/printer.go:12:23: undefined: Wrapper2", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + "test_data/wrapper", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/golangci-lint/test_data/golangci_lint_v1.63.4_unbuildable.check.shot b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_unbuildable.check.shot new file mode 100644 index 000000000..5e14a0891 --- /dev/null +++ b/linters/golangci-lint/test_data/golangci_lint_v1.63.4_unbuildable.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter golangci-lint test unbuildable 1`] = ` +{ + "issues": [ + { + "code": "error", + "file": ".", + "issueClass": "ISSUE_CLASS_NEW", + "level": "LEVEL_HIGH", + "linter": "golangci-lint", + "message": "typechecking error: build constraints exclude all Go files in /tmp/plugins_", + "targetType": "go", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "go", + "linter": "golangci-lint", + "paths": [ + ".", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`;