feat: Add unit-test to check consistency of Notice field names.#1345
feat: Add unit-test to check consistency of Notice field names.#1345bdferris-v2 merged 9 commits intomasterfrom
Conversation
…with other ClassGraph methods.
…ecking against an allow-list of existing field names.
|
@isabelle-dr curious to get your thoughts on this |
|
✅ Rule acceptance tests passed. |
|
Great addition! Can we see what it looks like when the test fails? |
|
Ideally, a developer would run In this example, |
|
✅ Rule acceptance tests passed. |
…lityData#1345) * Add a unit-test that enforces consistency of Notice field names by checking against an allow-list of existing field names. Co-authored-by: David Gamez <[email protected]>
…lityData#1345) * Add a unit-test that enforces consistency of Notice field names by checking against an allow-list of existing field names. Co-authored-by: David Gamez <[email protected]>

While working on better alignment of code and documentation as part of #1324, I fixed a few inconsistent field names (e.g.
filenamevsfileName). But I also wonder if we could catch these inconsistencies earlier. This PR provides a unit-test that checks allNoticefield names against a manually curated allow-list.Any time a new field name is added, this unit-test will fail. When that happens, we hope the author will do one of the following:
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything