-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Migrate to eclipse formatter to support multiple IDEs #122
Conversation
@@ -434,7 +435,7 @@ int getMinzoom(Tables.OsmHighwayLinestring element, String highwayClass) { | |||
private boolean isPierPolygon(Tables.OsmHighwayLinestring element) { | |||
if ("pier".equals(element.manMade())) { | |||
try { | |||
if (element.source().worldGeometry() instanceof LineString lineString && lineString.isClosed()) { | |||
if (element.source().worldGeometry()instanceof LineString lineString && lineString.isClosed()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bug in the current version of the eclipse formatter that removes the space before instanceof
- should be fixed when they upgrade to 4.22 diffplug/spotless#1059
https://github.com/onthegomap/planetiler/actions/runs/1949202487 ℹ️ Base Logs 5f2733a
ℹ️ This Branch Logs b4be7af
|
@wipfli here's a stab at migrating to the eclipse formatter, want to take the VSCode instructions out for a spin? |
Also I can add |
I can run the tests from vscode. Cool! |
I can check formatting from cli with |
@@ -12,3 +12,6 @@ echo "Building..." | |||
|
|||
echo "Running..." | |||
java -cp planetiler-dist/target/*-with-deps.jar com.onthegomap.planetiler.basemap.Generate -tag="${TAG}" | |||
|
|||
echo "Formatting..." | |||
./scripts/format.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for this. I think it will simplify collaboration :)
I think the ratchet is not needed. |
Migrate to eclipse formatter which seems to be the standard that is supported by many IDEs and add insructions for VSCode, IntelliJ and Eclipse.
mvn spotless:apply
/mvn spotless:check
(bound tomvn verify
).vscode/settings.json
with defaultsSee prior discussion on #110