MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
41 stars 10 forks source link

Add command-line option to ignore certain errors/warnings #69

Open isabelle-dr opened 2 years ago

isabelle-dr commented 2 years ago

Issue by barbeau Feb 12, 2020 Originally opened as https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/364


Summary:

When running in batch mode, users may want to ignore certain errors or warnings by using command-line parameters.

For example, we have this capability in the transit-feed-quality-calculator: https://github.com/CUTR-at-USF/transit-feed-quality-calculator#command-line-options

-errorsToIgnore "E017,E018" - (Optional) - A comma-delimited list of errors to ignore when calculating summary error results and generating the Excel file. By default errors that examine sequential feed iterations (E017, E018) are ignored (as archived files may not have been collected iteratively) (see TransitFeedQualityCalculator.java, but setting a value via the command-line parameter will overwrite the default value. -warningsToIgnore "W007,W008" - (Optional) - A comma-delimited list of warnings to ignore when calculating summary warnings results and generating the Excel file. By default warnings that examine sequential feed iterations (W007, W008) are ignored (as archived files may not have been collected iteratively) (see TransitFeedQualityCalculator.java, but setting a value via the command-line parameter will overwrite the default value.

However, the transit-feed-quality-calculator does this by filtering results after-the-fact. See: https://github.com/CUTR-at-USF/transit-feed-quality-calculator/blob/master/src/main/java/edu/usf/cutr/transitfeedqualitycalculator/TransitFeedQualityCalculator.java#L43

It would be nice to have a filtering feature built into the library itself.

Steps to reproduce:

Try to run the validator while ignoring certain errors or warnings so they don't appear in output

Expected behavior:

Ignore certain errors or warnings so they don't appear in output

Observed behavior:

This isn't possible