-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore comment in BUILD (#2492)
In this PR: - Ignore comment (leading with `#`) when parsing BUILD.bazel - Add unit tests Context: There's a [BUILD](https://github.com/googleapis/googleapis/blob/master/google/cloud/resourcemanager/v3/BUILD.bazel#L52C10-L52C50) in googleapis has common_resources.proto comment out. We need to adjust the regex pattern to adjust this case.
- Loading branch information
1 parent
6e8d098
commit 6ca20e5
Showing
13 changed files
with
77 additions
and
33 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
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/misc/BUILD_comment_common_resources.bazel
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
#"//google/cloud:common_resources_proto", | ||
] | ||
) |
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/misc/BUILD_comment_iam_policy.bazel
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
# "//google/iam/v1:iam_policy_proto", | ||
] | ||
) |
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/misc/BUILD_comment_locations.bazel
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
# "//google/cloud/location:location_proto", | ||
] | ||
) |
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/misc/BUILD_common_resources.bazel
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
"//google/cloud:common_resources_proto", | ||
] | ||
) |
4 changes: 1 addition & 3 deletions
4
...ditional_protos/BUILD_iam_locations.bazel → .../resources/misc/BUILD_iam_locations.bazel
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# this file is only used in testing `get_gapic_additional_protos_from_BUILD` in utilities.sh | ||
|
||
proto_library_with_info( | ||
deps = [ | ||
"//google/iam/v1:iam_policy_proto", | ||
"//google/cloud/location:location_proto", | ||
"//google/iam/v1:iam_policy_proto", | ||
] | ||
) |
5 changes: 5 additions & 0 deletions
5
library_generation/test/resources/misc/BUILD_iam_policy.bazel
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
"//google/iam/v1:iam_policy_proto", | ||
] | ||
) |
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,5 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
"//google/cloud/location:location_proto", | ||
] | ||
) |
4 changes: 4 additions & 0 deletions
4
library_generation/test/resources/misc/BUILD_no_additional_protos.bazel
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,4 @@ | ||
proto_library_with_info( | ||
deps = [ | ||
] | ||
) |
6 changes: 0 additions & 6 deletions
6
library_generation/test/resources/search_additional_protos/BUILD_common_resources.bazel
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
library_generation/test/resources/search_additional_protos/BUILD_iam_policy.bazel
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
library_generation/test/resources/search_additional_protos/BUILD_locations.bazel
This file was deleted.
Oops, something went wrong.
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