-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/dependencies-0b07636886
- Loading branch information
Showing
10 changed files
with
997 additions
and
437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 0.1 | ||
actions: | ||
definitions: | ||
- id: submodule-init-update | ||
display_name: Submodule Init Update | ||
description: Git hook for updating submodules | ||
run: git submodule update --init --recursive | ||
triggers: | ||
- git_hooks: [post-checkout, post-merge, pre-rebase] | ||
notify_on_error: false |
135 changes: 135 additions & 0 deletions
135
linters/buildifier/test_data/buildifier_v7.3.1_basic_check.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing linter buildifier test basic_check 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "module-docstring", | ||
"column": "1", | ||
"file": "test_data/basic.bzl", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#module-docstring", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "buildifier", | ||
"message": "The file has no module docstring. | ||
A module docstring is a string literal (not a comment) which should be the first statement of a file (it may follow comment lines).", | ||
"targetType": "starlark", | ||
}, | ||
{ | ||
"code": "load", | ||
"column": "26", | ||
"file": "test_data/basic.bzl", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#load", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "buildifier", | ||
"message": "Loaded symbol "a" is unused. Please remove it. | ||
To disable the warning, add '@unused' in a comment. | ||
If you want to re-export a symbol, use the following pattern: | ||
|
||
load(..., _a = "a", ...) | ||
a = _a", | ||
"targetType": "starlark", | ||
}, | ||
{ | ||
"code": "load", | ||
"column": "26", | ||
"file": "test_data/basic.bzl", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"issueUrl": "https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#load", | ||
"level": "LEVEL_HIGH", | ||
"line": "2", | ||
"linter": "buildifier", | ||
"message": "Loaded symbol "b" is unused. Please remove it. | ||
To disable the warning, add '@unused' in a comment. | ||
If you want to re-export a symbol, use the following pattern: | ||
|
||
load(..., _b = "b", ...) | ||
b = _b", | ||
"targetType": "starlark", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "fix", | ||
"fileGroupName": "bazel-build", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/add_tables.BUILD", | ||
], | ||
"verb": "TRUNK_VERB_FMT", | ||
}, | ||
{ | ||
"command": "fix", | ||
"fileGroupName": "starlark", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/basic.bzl", | ||
], | ||
"verb": "TRUNK_VERB_FMT", | ||
}, | ||
{ | ||
"command": "warn", | ||
"fileGroupName": "bazel-build", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/add_tables.BUILD", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "warn", | ||
"fileGroupName": "starlark", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/basic.bzl", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "warn", | ||
"fileGroupName": "bazel-build", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/add_tables.BUILD", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "warn", | ||
"fileGroupName": "starlark", | ||
"linter": "buildifier", | ||
"paths": [ | ||
"test_data/basic.bzl", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [ | ||
{ | ||
"column": "1", | ||
"file": "test_data/add_tables.BUILD", | ||
"issueClass": "ISSUE_CLASS_UNFORMATTED", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "buildifier", | ||
"message": "Incorrect formatting, autoformat by running 'trunk fmt'", | ||
}, | ||
{ | ||
"column": "1", | ||
"file": "test_data/basic.bzl", | ||
"issueClass": "ISSUE_CLASS_UNFORMATTED", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "buildifier", | ||
"message": "Incorrect formatting, autoformat by running 'trunk fmt'", | ||
}, | ||
], | ||
} | ||
`; |
36 changes: 36 additions & 0 deletions
36
linters/buildifier/test_data/buildifier_v7.3.1_no_config.test_data.add_tables.BUILD.fmt.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing formatter buildifier test no_config 1`] = ` | ||
"foo_macro( | ||
fizz = [ | ||
":lib2", | ||
":lib1", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "files", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
sh_library( | ||
name = "lib1", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_library( | ||
name = "lib2", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_binary( | ||
name = "foo", | ||
srcs = ["foo.sh"], | ||
deps = [ | ||
":lib1", | ||
":lib2", | ||
], | ||
) | ||
" | ||
`; |
11 changes: 11 additions & 0 deletions
11
linters/buildifier/test_data/buildifier_v7.3.1_no_config.test_data.basic.bzl.fmt.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing formatter buildifier test no_config 1`] = ` | ||
"# Misformatted file | ||
def eponymous_name(): | ||
name = native.package_name() | ||
|
||
return name[name.rfind("/") + 1:] | ||
" | ||
`; |
36 changes: 36 additions & 0 deletions
36
...rs/buildifier/test_data/buildifier_v7.3.1_with_config.test_data.add_tables.BUILD.fmt.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// trunk-upgrade-validation:RELEASE | ||
|
||
exports[`Testing formatter buildifier test with_config 1`] = ` | ||
"foo_macro( | ||
fizz = [ | ||
":lib1", | ||
":lib2", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "files", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
sh_library( | ||
name = "lib1", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_library( | ||
name = "lib2", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_binary( | ||
name = "foo", | ||
srcs = ["foo.sh"], | ||
deps = [ | ||
":lib1", | ||
":lib2", | ||
], | ||
) | ||
" | ||
`; |
Oops, something went wrong.