Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pattern from suppress trait entries #1455

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,6 @@ structure hostLabel {}
/// Suppresses validation events by ID for a given shape.
@trait
list suppress {
@pattern("^[_a-zA-Z][A-Za-z0-9]*$")
@length(min: 1)
member: String
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[SUPPRESSED] smithy.example#List2$member: Members? Yuck! | ListMembersAreBadOkay
[SUPPRESSED] -: Unable to locate a validator named `UnknownValidator2` (Please ignore this) | UnknownValidator_UnknownValidator2
[WARNING] -: Unable to locate a validator named `UnknownValidator1` | UnknownValidator_UnknownValidator1
[SUPPRESSED] smithy.example#MyService: This is suppressed | SuppressedValidator
[SUPPRESSED] smithy.example#MyService: This is suppressed | SuppressedValidator.Foo
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ metadata validators = [
{
// This one is suppressed.
name: "EmitEachSelector",
id: "SuppressedValidator",
id: "SuppressedValidator.Foo",
message: "This is suppressed",
severity: "WARNING",
configuration: {
Expand All @@ -43,11 +43,11 @@ metadata suppressions = [
reason: "Please ignore this",
},
{
id: "SuppressedValidator",
id: "SuppressedValidator.Foo",
namespace: "smithy.example.ignore.this.one", // matches nothing
},
{
id: "SuppressedValidator",
id: "SuppressedValidator.Foo",
namespace: "smithy.example"
},
]
Expand All @@ -60,6 +60,7 @@ service MyService {
operations: [GetFoo],
}

@suppress(["IgnoreMe.Too"])
operation GetFoo {
input: GetFooInput,
output: GetFooOutput
Expand Down