-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat: Add unit test to verify that every Notice has an entry in RULES.md #1331
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.md
with 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.md
for a newly added notice.For example, this test should fail initially because
StopWithoutLocationNotice
is missing fromRULES.md
per #1330.Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything