Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared Stops Validator SS_01: only consider stops from feed being checked #588

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

miles-grant-ibigroup
Copy link
Contributor

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

The shared stop validator was checking every stop from every feed. This sometimes created insane errors. This PR resolves this issue by adjusting some conditions so that only sensible stops are shown.

Stop syntheticStop = new Stop();
syntheticStop.stop_id = stopId;
if (feedId.equals(sharedStopFeedId)) {
if (seenStopIds.contains(stopId)) {
registerError(stops
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this can be simplified to the following because syntheticStop equals stopId:

registerError(syntheticStop, NewGTFSErrorType.MULTIPLE_SHARED_STOPS_GROUPS);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer not using synthetic stop if possible, since synthetic stop can't link to the editor

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine although I don't know what's happening

@miles-grant-ibigroup miles-grant-ibigroup merged commit 53dc10a into dev Feb 12, 2024
6 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the ss01-repair branch February 12, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants