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

Closed
wants to merge 1 commit into from

Conversation

syall
Copy link
Contributor

@syall syall commented Aug 11, 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

Updated the documentation for the Validation Event ID ABNF to
reflect these changes and also use camelcase tokens (included
changes in Shape ID documentation for consistency).

Fixed bugs in the ShapeId namespace code:

  • StringIndexOutOfBoundsException thrown for cases like "___".

  • Mismatch in IdentifierStart parsing compared to ABNF


Testing:

Ran ./gradlew clean build check assemble --parallel --no-build-cache --no-daemon


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 11, 2022 16:14
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

Updated the documentation for the Validation Event ID ABNF to
reflect these changes and also use camelcase tokens (included
changes in Shape ID documentation for consistency).

Fixed bugs in the ShapeId namespace code:

- StringIndexOutOfBoundsException thrown for cases like "___".

- Mismatch in `IdentifierStart` parsing compared to ABNF

Resolves smithy-lang#987
@syall syall force-pushed the validator-suppress-id-mismatch branch from 647a5f5 to e8f459c Compare August 17, 2022 21:21
@mtdowling
Copy link
Member

Closing based on #987 (comment)

@mtdowling mtdowling closed this Oct 19, 2022
@syall syall deleted the validator-suppress-id-mismatch branch March 2, 2023 13:12
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.

3 participants