False positives for duplicate_fare_rule_zone_id_fields in fare_rules.txt #1296
Labels
bug
Something isn't working (crash, a rule has a problem)
GTFS Reference
Used for Adding or changing rules that belong in the GTFS reference
status: Ready
An issue that is ready to be worked on.
Describe the bug
This was flagged by SDMTS.
False positives for the
duplicate_fare_rule_zone_id_fields
rule.They only have (fare_id, route_id) fields defined, every row has a unique combination of both.
The spec mentions that the primary key for
fare_rules.txt
is (*) which means: all fields (reference)They had
duplicate_fare_rule_zone_id_fields
triggered (which is an ERROR) and it looks like a problem with the way this rule is designed.Steps/Code to Reproduce
Expected Results
No issue with fare rules
Actual Results
The notice
duplicate_fare_rule_zone_id_fields
is triggered 296 times.Screenshots
No response
Files used
https://www.sdmts.com/google_transit_files/google_transit.zip
Validator version
4.0.0
Operating system
MacOS
Java version
No response
Additional notes
Now that we support multiple
@PrimaryKey
annotations, we don't need to have the duplicate_fare_rule_zone_id_fields rule in this validator at all.We can use the
@PrimaryKey
annotation infare_rules.txt
directly, and the notice duplicate_key will be triggered if we have duplicate records.The text was updated successfully, but these errors were encountered: