Skip to content

Conversation

@optionsome
Copy link
Member

Summary

Adds TrailingComment module to checkstyle and fixes the issues related to it.

Issue

Relates to #7068

Unit tests

No functional changes

Documentation

Not updated

Changelog

Skipped

@optionsome optionsome added this to the 2.9 (next release) milestone Dec 15, 2025
@optionsome optionsome requested a review from a team as a code owner December 15, 2025 22:13
@optionsome optionsome added !Technical Debt Improve code quality, no functional changes. +Skip Changelog This is not a relevant change for a product owner since last release. labels Dec 15, 2025
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 69.27711% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.17%. Comparing base (2540a97) to head (c525542).

Files with missing lines Patch % Lines
...java/org/opentripplanner/visualizer/ShowGraph.java 0.00% 15 Missing ⚠️
...planner/graph_builder/module/TripPatternNamer.java 0.00% 6 Missing ⚠️
...anner/ext/siri/updater/azure/SiriAzureUpdater.java 0.00% 3 Missing ⚠️
...pplanner/apis/gtfs/datafetchers/QueryTypeImpl.java 0.00% 3 Missing ⚠️
...lanner/graph_builder/module/ned/VerticalDatum.java 0.00% 3 Missing ⚠️
...t/fares/service/gtfs/v1/custom/HSLFareService.java 33.33% 1 Missing and 1 partial ⚠️
.../opentripplanner/street/model/edge/StreetEdge.java 0.00% 0 Missing and 2 partials ⚠️
...rg/opentripplanner/visualizer/GraphVisualizer.java 0.00% 2 Missing ⚠️
...grastertiles/TraversalPermissionsEdgeRenderer.java 0.00% 1 Missing ⚠️
...ripplanner/ext/edgenaming/PortlandCustomNamer.java 0.00% 1 Missing ⚠️
... and 13 more
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7138      +/-   ##
=============================================
- Coverage      72.17%   72.17%   -0.01%     
  Complexity     20877    20877              
=============================================
  Files           2273     2273              
  Lines          84437    84439       +2     
  Branches        8424     8425       +1     
=============================================
+ Hits           60942    60943       +1     
  Misses         20520    20520              
- Partials        2975     2976       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@optionsome optionsome removed the request for review from tkalvas December 17, 2025 13:25
Copy link
Member

@t2gran t2gran left a comment

Choose a reason for hiding this comment

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

There are a few comments witch can be removed. I added some suggestions for those, hopefully the code compiles ++ if applied.

Many comments can be replaced with constants replacing MAGIC numbers. But, I think that is beyond the scope of this PR.

I am ready to approve this PR, let me know when you have looked at my comments. If you choose to not apply the suggested changes that is ok. They are removing some of the comments witch I think does not provide any information.

Comment on lines 8 to 15
<module name="AvoidStarImport"/>
<module name="NeedBraces"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="UnusedLocalVariable"/>
<module name="NeedBraces"/>
<module name="TrailingComment">
<property name="format" value="^\s*$"/>
</module>
Copy link
Member

Choose a reason for hiding this comment

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

Consider: I would prefer to keep these in alphabetic order - less merge conflicts, easier to read if you are looking for something, avoid duplicates...

Copy link
Member Author

Choose a reason for hiding this comment

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

I already moved that NeedBraces rules just for that purpose but forgot to do the same for the new rule... I've fixed it now.

Comment on lines +29 to +40
// = 120 km/h. Varies between 80 - 120 km/h depending on road and season.
props.setCarSpeed("highway=motorway", 33.33f);
// = 54 km/h
props.setCarSpeed("highway=motorway_link", 15);
// = 100 km/h
props.setCarSpeed("highway=trunk", 27.27f);
// = 54 km/h
props.setCarSpeed("highway=trunk_link", 15);
// = 100 km/h
props.setCarSpeed("highway=primary", 27.27f);
// = 54 km/h
props.setCarSpeed("highway=primary_link", 15);
Copy link
Member

Choose a reason for hiding this comment

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

This should be replaced with constants (MAGIC NUMBERS) - witch will remove the need of explaining the value. I do not expect this to be done in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Skip Changelog This is not a relevant change for a product owner since last release. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants