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

How to detect duplicate shape definitions? #2194

Closed
kubukoz opened this issue Mar 18, 2024 · 0 comments · Fixed by #2247
Closed

How to detect duplicate shape definitions? #2194

kubukoz opened this issue Mar 18, 2024 · 0 comments · Fixed by #2247

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Mar 18, 2024

Hi!

I would like to detect and prevent duplicate definitions of shapes within a codebase. Does smithy-model allow me to do that?

At the moment, it appears that duplicate definitions are only logged as a warning, and there's nothing in the model loading result that would tell me that this happened. The SourceLocation also gets deduplicated into a single definition.

To reiterate/rephrase, I want to stop people from doing

@length(min: 1)
string NonEmptyString

@length(min: 1)
string NonEmptyString

in my repository. This has happened before (presumably as a result of a mishandled merge conflict) and it's only producing noise.

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 a pull request may close this issue.

1 participant