Skip to content

Add validation for duplicate names in the db config#1867

Merged
charisk merged 2 commits intomainfrom
charisk/validate-dups
Dec 14, 2022
Merged

Add validation for duplicate names in the db config#1867
charisk merged 2 commits intomainfrom
charisk/validate-dups

Conversation

@charisk
Copy link
Copy Markdown
Contributor

@charisk charisk commented Dec 13, 2022

This PR adds validation for duplicate names in the db config. As part of that we also needed to update the logic that renders errors to allow for 2 different kinds of errors:
a) Ones that the db config is just simply not valid based on the JSON schema
b) Ones that the db config is not valid for other reasons e.g. naming

Please feel free to suggest better names!

Checklist

N/A:

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@charisk charisk added the secexp label Dec 13, 2022
@charisk charisk requested review from a team as code owners December 13, 2022 14:51
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Just a minor typo so far! (I haven't been to test the behaviour yet, so will hold off on approving until we can take a look together 🙇🏽‍♀️ )

Comment thread extensions/ql-vscode/src/databases/config/db-config-validator.ts Outdated
Comment thread extensions/ql-vscode/test/pure-tests/databases/config/db-config-validator.test.ts Outdated
Comment thread extensions/ql-vscode/test/pure-tests/databases/config/db-config-validator.test.ts Outdated
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

@charisk charisk merged commit 602289e into main Dec 14, 2022
@charisk charisk deleted the charisk/validate-dups branch December 14, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants