feat: Add unit test to verify that every Notice has an entry in RULES.md#1331
feat: Add unit test to verify that every Notice has an entry in RULES.md#1331bdferris-v2 merged 5 commits intomasterfrom
Conversation
…with other ClassGraph methods.
|
✅ Rule acceptance tests passed. |
|
Thank you for adding this test @bdferris-v2 !
Why is the |
|
@isabelle-dr the test is correctly identifying that StopWithoutLocationNotice is not properly documented in RULES.md and failing as result :) |
|
✅ Rule acceptance tests passed. |
asvechnikov2
left a comment
There was a problem hiding this comment.
A couple of questions, otherwise, looks good, thank you!
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/NoticeSchemaGenerator.java
Outdated
Show resolved
Hide resolved
main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeDocumentationTest.java
Show resolved
Hide resolved
|
@asvechnikov2 thanks for the review! |
|
✅ Rule acceptance tests passed. |
….md (MobilityData#1331) * Add a unit test that verifies that every Notice has an entry in RULES.md. * Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods. * Include doc changes in the test_pack_doc.yml workflow.
….md (MobilityData#1331) * Add a unit test that verifies that every Notice has an entry in RULES.md. * Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods. * Include doc changes in the test_pack_doc.yml workflow.
….md (MobilityData#1331) * Add a unit test that verifies that every Notice has an entry in RULES.md. * Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods. * Include doc changes in the test_pack_doc.yml workflow.
Summary:
When writing new validation rules, we often forget to update
RULES.mdwith updated documentation. While #1324 has some ideas on addressing that in the long term, in the short term, we can add a unit-test that will fail if there is an entry inRULES.mdfor a newly added notice.For example, this test should fail initially because
StopWithoutLocationNoticeis missing fromRULES.mdper #1330.Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything