Skip to content

Commit

Permalink
Auto-add missing snapshots (#781)
Browse files Browse the repository at this point in the history
Create new snapshots from
https://github.com/trunk-io/plugins/actions/runs/9125002214

Co-authored-by: TylerJang27 <42743566+TylerJang27@users.noreply.github.com>
  • Loading branch information
trunk-open-pr-bot[bot] and TylerJang27 committed May 17, 2024
1 parent 12364d8 commit b0483cb
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 0 deletions.
44 changes: 44 additions & 0 deletions linters/buf/test_data/buf_breaking_v1.32.0_basic.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter buf-breaking test basic 1`] = `
{
"issues": [
{
"code": "FIELD_NO_DELETE",
"column": "5",
"file": "test_data/buf_breaking.in.proto",
"issueUrl": "https://docs.buf.build/breaking/rules#field_no_delete",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "buf-breaking",
"message": "Previously present field "2" with name "world" on message "HelloWorld" was deleted.",
"targetType": "proto",
},
{
"code": "FIELD_SAME_TYPE",
"column": "7",
"file": "test_data/buf_breaking.in.proto",
"issueUrl": "https://docs.buf.build/breaking/rules#field_same_type",
"level": "LEVEL_HIGH",
"line": "8",
"linter": "buf-breaking",
"message": "Field "1" with name "hello" on message "HelloWorld" changed type from "string" to "int32".",
"targetType": "proto",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "proto",
"linter": "buf-breaking",
"paths": [
".",
],
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
55 changes: 55 additions & 0 deletions linters/buf/test_data/buf_breaking_v1.32.0_dupFile.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter buf-breaking test dupFile 1`] = `
{
"issues": [
{
"code": "COMPILE",
"column": "13",
"file": "test_data/buf_breaking.in.proto",
"issueUrl": "https://docs.buf.build/breaking/rules#compile",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "buf-breaking",
"message": "symbol "trunk.HelloWorld" already defined at test_data/buf_breaking.in.proto:7:13",
"targetType": "proto",
},
{
"code": "COMPILE",
"column": "13",
"file": "test_data/buf_breaking.in.proto",
"issueUrl": "https://docs.buf.build/breaking/rules#compile",
"level": "LEVEL_HIGH",
"line": "8",
"linter": "buf-breaking",
"message": "symbol "trunk.HelloWorld.hello" already defined at test_data/buf_breaking.in.proto:8:13",
"targetType": "proto",
},
{
"code": "COMPILE",
"column": "13",
"file": "test_data/buf_breaking.in.proto",
"issueUrl": "https://docs.buf.build/breaking/rules#compile",
"level": "LEVEL_HIGH",
"line": "9",
"linter": "buf-breaking",
"message": "symbol "trunk.HelloWorld.world" already defined at test_data/buf_breaking.in.proto:9:13",
"targetType": "proto",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "proto",
"linter": "buf-breaking",
"paths": [
".",
],
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
14 changes: 14 additions & 0 deletions linters/buf/test_data/buf_format_v1.32.0_buf_lint.fmt.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing formatter buf-format test buf_lint 1`] = `
"syntax = "proto3";

package trunk;

enum GoodEnum {
lower_case_UNSPECIFIED = 0;
GOOD_ENUM_VALUE_1 = 1;
}
"
`;
92 changes: 92 additions & 0 deletions linters/buf/test_data/buf_lint_v1.32.0_buf_lint.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter buf-lint test buf_lint 1`] = `
{
"issues": [
{
"code": "FILE_LOWER_SNAKE_CASE",
"column": "1",
"file": "test_data/buf_lint.in.proto",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.buf.build/lint/rules#file_lower_snake_case",
"level": "LEVEL_HIGH",
"line": "1",
"linter": "buf-lint",
"message": "Filename "buf_lint.in.proto" should be lower_snake_case.proto, such as "buf_lint_in.proto".",
"targetType": "proto",
},
{
"code": "PACKAGE_DIRECTORY_MATCH",
"column": "1",
"file": "test_data/buf_lint.in.proto",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.buf.build/lint/rules#package_directory_match",
"level": "LEVEL_HIGH",
"line": "4",
"linter": "buf-lint",
"message": "Files with package "trunk" must be within a directory "trunk" relative to root but were in directory "test_data".",
"targetType": "proto",
},
{
"code": "PACKAGE_VERSION_SUFFIX",
"column": "1",
"file": "test_data/buf_lint.in.proto",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.buf.build/lint/rules#package_version_suffix",
"level": "LEVEL_HIGH",
"line": "4",
"linter": "buf-lint",
"message": "Package name "trunk" should be suffixed with a correctly formed version, such as "trunk.v1".",
"targetType": "proto",
},
{
"code": "ENUM_VALUE_PREFIX",
"column": "3",
"file": "test_data/buf_lint.in.proto",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.buf.build/lint/rules#enum_value_prefix",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "buf-lint",
"message": "Enum value name "lower_case_UNSPECIFIED" should be prefixed with "GOOD_ENUM_".",
"targetType": "proto",
},
{
"code": "ENUM_VALUE_UPPER_SNAKE_CASE",
"column": "3",
"file": "test_data/buf_lint.in.proto",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.buf.build/lint/rules#enum_value_upper_snake_case",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "buf-lint",
"message": "Enum value name "lower_case_UNSPECIFIED" should be UPPER_SNAKE_CASE, such as "LOWER_CASE_UNSPECIFIED".",
"targetType": "proto",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "proto",
"linter": "buf-lint",
"paths": [
"test_data/buf_lint.in.proto",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "proto",
"linter": "buf-lint",
"paths": [
"test_data/buf_lint.in.proto",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;

0 comments on commit b0483cb

Please sign in to comment.