File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ Here is a human friendly list of them :
163163| MissingName | Error | An agency, a route or a stop has its name missing. |
164164| MissingCoordinates | Warning | A shape point or a stop is missing its coordinate(s). |
165165| NullDuration | Warning | The travel duration between two stops is null. |
166- | MissingLanguage | Warning | The publisher language code is missing. |
166+ | MissingLanguage | Warning| Error | The publisher language code is missing. |
167167| InvalidLanguage | Warning | The publisher language code is not valid. |
168168| DuplicateObjectId | Error | The object has at least one object with the same ID. |
169169| InvalidStopLocationTypeInTrip | Warning | Only Stop Points are allowed to be used in a Trip |
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pub fn validate(gtfs: >fs_structures::Gtfs) -> Vec<Issue> {
2020 . feed_info
2121 . iter ( )
2222 . filter ( missing_lang)
23- . map ( |feed_info| make_issue ( feed_info, Severity :: Warning , IssueType :: MissingLanguage ) ) ;
23+ . map ( |feed_info| make_issue ( feed_info, Severity :: Error , IssueType :: MissingLanguage ) ) ;
2424 let invalid_lang = gtfs. feed_info . iter ( ) . filter ( invalid_lang) . map ( |feed_info| {
2525 make_issue ( feed_info, Severity :: Warning , IssueType :: InvalidLanguage )
2626 . details ( & format ! ( "Language code {} does not exist" , feed_info. lang) )
@@ -105,6 +105,7 @@ fn test_missing_lang() {
105105
106106 assert_eq ! ( 1 , missing_lang_issue. len( ) ) ;
107107 assert_eq ! ( IssueType :: MissingLanguage , missing_lang_issue[ 0 ] . issue_type) ;
108+ assert_eq ! ( Severity :: Error , missing_lang_issue[ 0 ] . severity) ;
108109}
109110
110111#[ test]
@@ -118,6 +119,7 @@ fn test_valid_lang() {
118119 . collect ( ) ;
119120 assert_eq ! ( 1 , invalid_lang_issue. len( ) ) ;
120121 assert_eq ! ( IssueType :: InvalidLanguage , invalid_lang_issue[ 0 ] . issue_type) ;
122+ assert_eq ! ( Severity :: Warning , invalid_lang_issue[ 0 ] . severity) ;
121123}
122124
123125#[ test]
You can’t perform that action at this time.
0 commit comments