refactor: distinguish between info, warning, and error notices#716
refactor: distinguish between info, warning, and error notices#716
Conversation
- implement new rule logic - write additional unit tests - update documentation
Co-authored-by: Sean Barbeau <[email protected]>
… into non-ascii-id
# Conflicts: # core/src/main/java/org/mobilitydata/gtfsvalidator/notice/NonAsciiOrNonPrintableCharNotice.java # core/src/test/java/org/mobilitydata/gtfsvalidator/parsing/RowParserTest.java
|
[WIP] Listing of errors/warnings/system errors: #709 |
aababilov
left a comment
There was a problem hiding this comment.
This is a good start! Thank you, Lionel.
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/SeverityLevel.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/Notice.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/ValidationNotice.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/RouteNameValidator.java
Outdated
Show resolved
Hide resolved
- clarify javadocs - reset Notice to unmutable elements: - remove setter - define 2 constructors for ValidationNotice class - include SeverityLevel in .equals(), .toString() and .hashCode() methods from Notice class
|
Thanks @aababilov for your review! I modified the code and provided sample usage for |
|
I noticed that some notices can be used in different context (as
Is providing two constructors for this kind of notice the right approach to this situation (as done in 156ccf5)? |
|
156ccf5 is very nice. We actually need just a single constructor that requires to provide severity explicitly, so that the caller never forgets to set it. |
|
Very good, ship it! And thanks! |
- rework notices usage to include SeverityLevel
|
Thanks @aababilov! |
barbeau
left a comment
There was a problem hiding this comment.
@lionel-nj Thanks for this, it mostly LGTM! A few corrections to typos and a comment in-line.
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/ValidationNotice.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/SystemError.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingTripEdgeValidator.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Sean Barbeau <[email protected]>
closes #549
Summary:
This PR is a refactor proposal aimed at implementing the distinction between
INFO,WARNING, andERRORnotices.Expected behavior:
SystemErrorseverity level is set toSeverityLevel.ERRORValidationNoticeseverity level is set toSeverityLevel.ERRORPlease make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything[ ] Include screenshot(s) showing how this pull request works and fixes the issue(s)