-
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.
This commit closes #797 The CLI will now log validation events as they occur rather than waiting until all events are encountered before writing them. This makes the CLI a bit more responsive when validating hundreds of thousands of shapes. Other improvements were added to the CLI output as well, including the --severity parameter to set the minimum severity to display in output. This can significantly cut down on noise when model files emit things < DANGER.
- Loading branch information
Showing
10 changed files
with
241 additions
and
24 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
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
50 changes: 50 additions & 0 deletions
50
smithy-cli/src/test/resources/software/amazon/smithy/cli/commands/validation-events.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,50 @@ | ||
$version: "1.0" | ||
|
||
metadata validators = [ | ||
{ | ||
name: "EmitEachSelector", | ||
id: "EmitSuppressed", | ||
severity: "NOTE", | ||
configuration: { | ||
selector: "[id = smithy.example#Suppressed]" | ||
} | ||
}, | ||
{ | ||
name: "EmitEachSelector", | ||
id: "EmitNotes", | ||
severity: "NOTE", | ||
configuration: { | ||
selector: "[id = smithy.example#Note]" | ||
} | ||
}, | ||
{ | ||
name: "EmitEachSelector", | ||
id: "EmitWarnings", | ||
severity: "WARNING", | ||
configuration: { | ||
selector: "[id = smithy.example#Warning]" | ||
} | ||
}, | ||
{ | ||
name: "EmitEachSelector", | ||
id: "EmitDangers", | ||
severity: "DANGER", | ||
configuration: { | ||
selector: "[id = smithy.example#Danger]" | ||
} | ||
} | ||
] | ||
|
||
namespace smithy.example | ||
|
||
@suppress(["EmitSuppressed"]) | ||
string Suppressed | ||
|
||
string Note | ||
|
||
string Warning | ||
|
||
string Danger | ||
|
||
@required // this trait is invalid and causes an error. | ||
string Error |
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
Oops, something went wrong.