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

Add validation to validator and suppression ids #1325

Closed
wants to merge 1 commit into from

Conversation

syall
Copy link
Contributor

@syall syall commented Aug 3, 2022

Issue #, if available:

#987

Description of changes:

Prior, validator ids / names and the suppressions from metadata
were not constrained by any language, while the suppression trait
pattern was overly constrained.

This commit ensures validators and suppressions share the same ABNF
in the following places:

  • validators metadata

  • suppressions metadata

  • @suppress trait

Also, fixed bugs in the ShapeId namespace code:

  • StringIndexOutOfBoundsException thrown for the case "___".

  • Mismatch in identifier_start parsing compared to ABNF

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@syall syall requested a review from a team as a code owner August 3, 2022 22:17
Prior, validator ids / names and the suppressions from metadata
were not constrained by any language, while the suppression trait
pattern was overly constrained.

This commit ensures validators and suppressions share the same ABNF
in the following places:

- `validators` metadata

- `suppressions` metadata

- `@suppress` trait

Also, fixed bugs in the ShapeId namespace code:

- StringIndexOutOfBoundsException thrown for the case "___".

- Mismatch in `identifier_start` parsing compared to ABNF

Resolves: smithy-lang#987
@syall syall force-pushed the validator-suppress-id-mismatch branch from 569602a to bc22cb8 Compare August 3, 2022 23:30
@mtdowling
Copy link
Member

Can you send this to the idl-2.0 branch please since we're on the verge of shipping it?

@syall
Copy link
Contributor Author

syall commented Aug 4, 2022

Closing this PR in favor of #1326 targeting the idl-2.0 branch.

@syall syall closed this Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants