Skip to content

Commit 68964e2

Browse files
authored
Merge 3e0c47b into dc6a598
2 parents dc6a598 + 3e0c47b commit 68964e2

File tree

87 files changed

+366
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+366
-373
lines changed

RULES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Each Notice is associated with a severity: `INFO`, `WARNING`, `ERROR`.
6464
| [`missing_required_column`](#missing_required_column) | A required column is missing in the input file. |
6565
| [`missing_required_field`](#missing_required_field) | A required field is missing. |
6666
| [`missing_required_file`](#missing_required_file) | A required file is missing. |
67-
| [`missing_stop_name`](#missing_stop_name) | `stops.stop_name` is required for `location_type` equal to `0`, `1`, or `2`. |
67+
| [`missing_stop_name`](#missing_stop_name) | `stops.stop_name` is required for `location_type` equal to `0`, `1`, or `2`. |
6868
| [`missing_trip_edge`](#missing_trip_edge) | Missing trip edge `arrival_time` or `departure_time`. |
6969
| [`new_line_in_value`](#new_line_in_value) | New line or carriage return in a value in CSV file. |
7070
| [`number_out_of_range`](#number_out_of_range) | Out of range value. |
@@ -81,7 +81,7 @@ Each Notice is associated with a severity: `INFO`, `WARNING`, `ERROR`.
8181
| [`stop_time_timepoint_without_times`](#stop_time_timepoint_without_times) | `arrival_time` or `departure_time` not specified for timepoint. |
8282
| [`stop_time_with_arrival_before_previous_departure_time`](#stop_time_with_arrival_before_previous_departure_time) | Backwards time travel between stops in `stop_times.txt` |
8383
| [`stop_time_with_only_arrival_or_departure_time`](#stop_time_with_only_arrival_or_departure_time) | Missing `stop_times.arrival_time` or `stop_times.departure_time`. |
84-
| [`stop_without_location`](#stop_without_location) | `stop_lat` and/or `stop_lon` is missing for stop with `location_type` equal to`0`, `1`, or `2`
84+
| [`stop_without_location`](#stop_without_location) | `stop_lat` and/or `stop_lon` is missing for stop with `location_type` equal to`0`, `1`, or `2` |
8585
| [`stop_without_zone_id`](#stop_without_zone_id) | Stop without value for `stops.zone_id`. |
8686
| [`too_many_rows`](#too_many_rows) | A CSV file has too many rows. |
8787
| [`transfer_with_invalid_stop_location_type`](#transfer_with_invalid_stop_location_type) | A stop id field from GTFS file `transfers.txt` references a stop that has a `location_type` other than 0 or 1 (aka Stop/Platform or Station). |
@@ -101,7 +101,7 @@ Each Notice is associated with a severity: `INFO`, `WARNING`, `ERROR`.
101101
| [`duplicate_route_name`](#duplicate_route_name) | Two distinct routes have either the same `route_short_name`, the same `route_long_name`, or the same combination of `route_short_name` and `route_long_name`. |
102102
| [`empty_row`](#empty_row) | A row in the input file has only spaces. |
103103
| [`equal_shape_distance_same_coordinates`](#equal_shape_distance_same_coordinates) | Two consecutive points have equal `shape_dist_traveled` and the same lat/lon coordinates in `shapes.txt`. |
104-
| [`expired_calendar`](#expired_calendar) | Dataset should not contain date ranges for services that have already expired.
104+
| [`expired_calendar`](#expired_calendar) | Dataset should not contain date ranges for services that have already expired. |
105105
| [`fast_travel_between_consecutive_stops`](#fast_travel_between_consecutive_stops) | A transit vehicle moves too fast between two consecutive stops. |
106106
| [`fast_travel_between_far_stops`](#fast_travel_between_far_stops) | A transit vehicle moves too fast between two far stops. |
107107
| [`feed_expiration_date7_days`](#feed_expiration_date7_days) | Dataset should be valid for at least the next 7 days. |
@@ -114,7 +114,7 @@ Each Notice is associated with a severity: `INFO`, `WARNING`, `ERROR`.
114114
| [`missing_recommended_field`](#missing_recommended_field) | A recommended field is missing. |
115115
| [`missing_timepoint_column`](#missing_timepoint_column) | `timepoint` column is missing for a dataset. |
116116
| [`missing_timepoint_value`](#missing_timepoint_value) | `stop_times.timepoint` value is missing for a record. |
117-
| [`mixed_case_recommended_field`](#mixed_case_recommended_field) | This field has customer-facing text and should use Mixed Case (should contain upper and lower case letters). |
117+
| [`mixed_case_recommended_field`](#mixed_case_recommended_field) | This field has customer-facing text and should use Mixed Case (should contain upper and lower case letters). |
118118
| [`more_than_one_entity`](#more_than_one_entity) | More than one row in CSV. |
119119
| [`non_ascii_or_non_printable_char`](#non_ascii_or_non_printable_char) | Non ascii or non printable char in `id`. |
120120
| [`pathway_dangling_generic_node`](#pathway_dangling_generic_node) | A generic node has only one incident location in a pathway graph. |

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/CsvParsingFailedNotice.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
* Parsing of a CSV file failed.
2626
*
2727
* <p>One common case of the problem is when a cell value contains more than 4096 characters.
28-
*
29-
* <p>Severity: {@code SeverityLevel.ERROR}
3028
*/
3129
@GtfsValidationNotice(severity = ERROR)
3230
public class CsvParsingFailedNotice extends ValidationNotice {

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/DuplicateKeyNotice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice.UrlRef;
2525

2626
/**
27-
* The values of the given key and rows are duplicates.
27+
* Duplicated entity.
2828
*
29-
* <p>Severity: {@code SeverityLevel.ERROR}
29+
* <p>The values of the given key and rows are duplicates.
3030
*/
3131
@GtfsValidationNotice(
3232
severity = ERROR,

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/DuplicatedColumnNotice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice.UrlRef;
2424

2525
/**
26-
* The input file CSV header has the same column name repeated.
26+
* Duplicated column in CSV.
2727
*
28-
* <p>Severity: {@code SeverityLevel.ERROR}
28+
* <p>The input file CSV header has the same column name repeated.
2929
*/
3030
@GtfsValidationNotice(
3131
severity = ERROR,

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/EmptyColumnNameNotice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice.SectionRefs;
2323

2424
/**
25-
* A column name is empty. Such columns are skipped by the validator.
25+
* A column name is empty.
2626
*
27-
* <p>Severity: {@code SeverityLevel.ERROR}
27+
* <p>Such columns are skipped by the validator.
2828
*/
2929
@GtfsValidationNotice(severity = ERROR, sections = @SectionRefs(FILE_REQUIREMENTS))
3030
public class EmptyColumnNameNotice extends ValidationNotice {

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/EmptyFileNotice.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
/**
2525
* A CSV file is empty.
2626
*
27-
* <p>Severity: {@code SeverityLevel.ERROR}
27+
* <p>Empty csv file found in the archive: file does not have any headers, or is a required file and
28+
* does not have any data. The GTFS specification requires the first line of each file to contain
29+
* field names and required files must have data.
2830
*/
2931
@GtfsValidationNotice(severity = ERROR, sections = @SectionRefs(FILE_REQUIREMENTS))
3032
public class EmptyFileNotice extends ValidationNotice {

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/EmptyRowNotice.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
*
2727
* <p>Some CSV parsers, such as Univocity, may misinterpret it as a non-empty row that has a single
2828
* column which is empty, hence we show a warning.
29-
*
30-
* <p>Severity: {@code SeverityLevel.WARNING}
3129
*/
3230
@GtfsValidationNotice(severity = WARNING, sections = @SectionRefs(FILE_REQUIREMENTS))
3331
public class EmptyRowNotice extends ValidationNotice {

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/ForeignKeyViolationNotice.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice.UrlRef;
2424

2525
/**
26-
* The values of the given key and rows of one table cannot be found a values of the given key in
27-
* another table.
26+
* Wrong foreign key.
2827
*
29-
* <p>This is the case when a foreign key of one table references a non-existing value in its
30-
* original table.
31-
*
32-
* <p>Severity: {@code SeverityLevel.ERROR}
28+
* <p>A foreign key references the primary key of another file. A foreign key violation means that
29+
* the foreign key referenced from a given row (the child file) cannot be found in the corresponding
30+
* file (the parent file). The Foreign keys are defined in the specification under "Type" for each
31+
* file.
3332
*/
3433
@GtfsValidationNotice(
3534
severity = ERROR,

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/IOError.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
import java.io.IOException;
2222
import org.mobilitydata.gtfsvalidator.annotation.GtfsValidationNotice;
2323

24-
/**
25-
* This is related to Input and Output operations in the code.
26-
*
27-
* <p>Severity: {@code SeverityLevel.ERROR}
28-
*/
24+
/** Error in IO operation. */
2925
@GtfsValidationNotice(severity = ERROR)
3026
public class IOError extends SystemError {
3127

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/InvalidColorNotice.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
*
2727
* <p>A color must be encoded as a six-digit hexadecimal number. The leading "#" is not included.
2828
*
29-
* <p>Example: {@code FFFFFF} for white, {@code 000000} for black or {@code 0039A6} for the A,C,E
30-
* lines in NYMTA.
31-
*
32-
* <p>Severity: {@code SeverityLevel.ERROR}
29+
* <p>Example: `FFFFFF` for white, `000000` for black or `0039A6` for the A,C,E lines in NYC MTA.
3330
*/
3431
@GtfsValidationNotice(severity = ERROR, sections = @SectionRefs(FILED_TYPES))
3532
public class InvalidColorNotice extends ValidationNotice {

0 commit comments

Comments
 (0)