forked from hashicorp/terraform-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hashicorp#37543 from hashicorp/t-const-churn-help
ci: Clean up constant ci, fixes for churn
- Loading branch information
Showing
8 changed files
with
276 additions
and
469 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
# Generated by internal/generate/attrconsts/main.go; DO NOT EDIT. | ||
rules: | ||
{{- range .Constants }} | ||
- id: literal-{{ .ConstantLower }}-string-constant | ||
- id: literal-{{ .Literal }}-string-constant | ||
languages: [go] | ||
message: Use the constant `names.Attr{{ .Constant }}` for the string literal "{{ .ConstantLower }}" | ||
message: Use the constant `names.Attr{{ .Constant }}` for the string literal "{{ .Literal }}" | ||
paths: | ||
include: | ||
- "internal/service/**/*.go" | ||
patterns: | ||
- pattern: '"{{ .ConstantLower }}"' | ||
pattern: '"{{ .Literal }}"' | ||
severity: ERROR | ||
fix: "names.Attr{{ .Constant }}" | ||
{{- end }} |