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 #1326

Closed
wants to merge 1 commit into from

Conversation

syall
Copy link
Contributor

@syall syall commented Aug 4, 2022

Note: Created this pull request to target the idl-2.0 branch compared to #1325.

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 force-pushed the idl-2.0 branch 2 times, most recently from 69a6da5 to 58be0cf Compare August 4, 2022 18:02
@syall syall marked this pull request as ready for review August 4, 2022 18:29
@syall syall requested a review from a team as a code owner August 4, 2022 18:29
@syall syall marked this pull request as draft August 4, 2022 22:09
@syall
Copy link
Contributor Author

syall commented Aug 4, 2022

Dependent on release of idl-2.0

@syall syall changed the base branch from idl-2.0 to main August 11, 2022 05:45
@syall syall force-pushed the idl-2.0 branch 2 times, most recently from 4023563 to 58be0cf Compare August 11, 2022 05:51
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 closed this Aug 11, 2022
@syall syall deleted the idl-2.0 branch August 11, 2022 05:59
@syall
Copy link
Contributor Author

syall commented Aug 11, 2022

Closed due to Smithy 2.0 launch!

Will make a new PR based on main.

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.

1 participant