Opened 6 years ago

Last modified 6 years ago

#18138 closed enhancement

[PATCH] Validator rules for connectivity relations — at Version 10

Reported by: Traaker_L Owned by: team
Priority: normal Milestone: 20.05
Component: Core validator Version:
Keywords: connectivity, validator, lanes Cc: GerdP, taylor.smock, simon04, stoecker

Description (last modified by Traaker_L)

Validator rules that check for references to non-existent lanes in the connectivity tag, no connectivity tag in the relation, or an unknown role in the relation.

Change History (13)

by Traaker_L, 6 years ago

Attachment: 18138.patch added

comment:1 by Traaker_L, 6 years ago

Last edited 6 years ago by Traaker_L (previous) (diff)

comment:2 by Traaker_L, 6 years ago

Description: modified (diff)

comment:3 by Don-vip, 6 years ago

Thanks! For the final patch, please also make sure to run ant pmd checkstyle and check there's no violation.

by Traaker_L, 6 years ago

Attachment: 18138.1.patch added

comment:4 by Don-vip, 6 years ago

Is it still WIP?

in reply to:  4 ; comment:5 by anonymous, 6 years ago

Replying to Don-vip:

Is it still WIP?

It is not. Sorry, I forgot to remove that when I added the new patch file. It's now ready to go!

comment:6 by anonymous, 6 years ago

Summary: [WIP PATCH] Validator rules for connectivity relations[PATCH] Validator rules for connectivity relations

in reply to:  5 comment:7 by Traaker_L, 6 years ago

Also, credit where credit is due, the unit tests were written by taylor.smock.

comment:8 by Don-vip, 6 years ago

Remarks:

  • New presets items need an SVG icon.
  • conflict with r15405. Test error codes range must be increased
  • why return a new TreeMap for relations without connectivity instead of Collections.emptyMap()?
  • please catch NumberFormatException in case the number parsing fails
  • don't compile patterns in a loop. Please make them static final fields
  • use Boolean.TRUE / Boolean.FALSE for the constants you put in the map
  • when using equals with a constant, please use <constant>.equals(<variable>)

in reply to:  8 comment:9 by Traaker_L, 6 years ago

Replying to Don-vip:

Remarks:

  • New presets items need an SVG icon.
  • conflict with r15405. Test error codes range must be increased
  • why return a new TreeMap for relations without connectivity instead of Collections.emptyMap()?
  • please catch NumberFormatException in case the number parsing fails
  • don't compile patterns in a loop. Please make them static final fields
  • use Boolean.TRUE / Boolean.FALSE for the constants you put in the map
  • when using equals with a constant, please use <constant>.equals(<variable>)

Thank you very much for the feedback! I will make sure to address those issues as soon as possible.

by Traaker_L, 6 years ago

Attachment: 18138.2.patch added

comment:10 by Traaker_L, 6 years ago

Description: modified (diff)

The patch is ready to go!

Last edited 6 years ago by Traaker_L (previous) (diff)
Note: See TracTickets for help on using tickets.