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

Fix #133: check for duplicate identifiers in PresetParser #357

Conversation

FroggieFrog
Copy link
Collaborator

This PR fixes #133 by adding a Validator to the PresetParser.

This Validator checks all given buildings for uniquness of their Identifier property.
If there are duplicates found, all duplicate Identifier values will be printed to the console.

@FroggieFrog FroggieFrog added the PresetParser Features or issues relationg to the PresetParser. label Sep 14, 2021
@FroggieFrog FroggieFrog added this to the Anno Designer 9.2 Release milestone Sep 14, 2021
…avoid conflicts

Gave text on the warhouse double identifier, as this is intended, same icon, same identifier, same translations
Update Presets.json because of removed double identifier buidings
Copy link
Contributor

@StingMcRay StingMcRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please be so kind to check my changes too on the files
ValidatorTests where oke

Copy link
Contributor

@StingMcRay StingMcRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks OK for me 👍

- moved validation logic to validator
- added more tests
@FroggieFrog
Copy link
Collaborator Author

FroggieFrog commented Sep 14, 2021

@StingMcRay
I made some changes and also added an option (-validate) to validate an existing file (see image).
Could you please check again if this ok for you?

PresetParser

@StingMcRay
Copy link
Contributor

Ow thanks that is nice done :)
i will check tomorrow if you don't mind, i got something else on my hand so...

Copy link
Contributor

@StingMcRay StingMcRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfect.

@FroggieFrog FroggieFrog merged commit 0c3dcb1 into AnnoDesigner:master Sep 15, 2021
@FroggieFrog FroggieFrog deleted the fix-133-check-duplicate-identifiers branch September 15, 2021 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PresetParser Features or issues relationg to the PresetParser.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check identifier for uniqueness
2 participants