-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression that allowed suppressing ERROR
There was a regression in #1890 that allowed ERROR events to be suppressed. This was not intentional and we do not want to remove this restriction. ERROR events indicate that the model is in an unusable state because it violates a MUST in the spec or some other necessary requirement to make it usable (like referring only to shapes that exist). New test cases have been added to guard against this regression in the future. Closes #2128
- Loading branch information
Showing
7 changed files
with
30 additions
and
14 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
1 change: 1 addition & 0 deletions
1
.../amazon/smithy/model/errorfiles/loader/suppression-metadata-cannot-suppress-errors.errors
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 @@ | ||
[ERROR] foo.baz#MyString: Trait `idempotent` | TraitTarget |
13 changes: 13 additions & 0 deletions
13
.../amazon/smithy/model/errorfiles/loader/suppression-metadata-cannot-suppress-errors.smithy
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,13 @@ | ||
$version: "2" | ||
|
||
metadata suppressions = [ | ||
{ | ||
namespace: "foo.baz" | ||
id: "TraitTarget" | ||
} | ||
] | ||
|
||
namespace foo.baz | ||
|
||
@idempotent // < this is invalid | ||
string MyString |
1 change: 1 addition & 0 deletions
1
...are/amazon/smithy/model/errorfiles/loader/suppression-trait-cannot-suppress-errors.errors
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 @@ | ||
[ERROR] foo.baz#MyString: Trait `idempotent` | TraitTarget |
7 changes: 7 additions & 0 deletions
7
...are/amazon/smithy/model/errorfiles/loader/suppression-trait-cannot-suppress-errors.smithy
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,7 @@ | ||
$version: "2" | ||
|
||
namespace foo.baz | ||
|
||
@suppress(["TraitTarget"]) | ||
@idempotent // < this is invalid | ||
string MyString |
7 changes: 0 additions & 7 deletions
7
...el/src/test/resources/software/amazon/smithy/model/knowledge/member-property-index.smithy
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