Groovy's "apply" adds semicolons
See original GitHub issueI have a custom importOrder
for groovy
and when I do a gradle spotlessApply
it fixes that but it also adds semicolons to all import statements which it should not do.
P.S. I see now that actually this could be configured using Eclipse’s Groovy plugin - however I don’t see how to export Grvooy’s formatter settings - rather, I see only how to do so for Java’s.
P.S. 2 - I found some link with an example file so I’ll be closing this issue. The link to greclipse.properties
in the README is broken, you might want to fix that.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Groovy Goodness: Semicolons are Optional - Mrhaki
In Groovy we can leave out semicolons at the end of the line. As long as we use one statement per line. If...
Read more >add semicolon on the end of the first line in csv file -groovy
Hello again, what method should i use to add semicolon at the end of each line? e.g. > field1,field2,field3,fieldN; > value1,value2,value3 ...
Read more >Style guide - The Apache Groovy programming language
1. No semicolons ... When coming from a C / C++ / C# / Java background, we're so used to semicolons, that we...
Read more >Those groovy semicolons | Sentence first - WordPress.com
Hi Stan: Two points. First, I never used to use semi-colons; now I use them all the time. In fact, I think they're...
Read more >Groovy, Sometimes You Still Need a Semicolon. - DZone
Like Javascript, semicolons are optional in Groovy except for when they aren't optional. These examples are both pretty contrived, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Work around for bounded wild-cards
The PR will basically only skip the file processing. I made some major refactoring on how Spotless integrates Eclipse plugins and I am afraid I still need some more time. But you have the same effect, by just excluding the file manually. You can use the Gradle [file tree](https://docs.gradle.org/current/userguide/working_with_files.html#sec:file_trees) and use it as Spotless target. Untested example:Solution for bounded wild-cards
The plugin error message should be in "eclipse-workspace"/.metatdata/.log. I would appreciate if you can report the issue (with the Eclipse logs) to the [groovy-eclipse](https://github.com/groovy/groovy-eclipse) team. For a long period there was not much progress on the project, but it seems that they have for a couple of month now a team back together which is continuing the development. Please let me know as soon as a **groovy-eclipse** release is available which solves problem. I will integrated it to Spotless. I leave this issue open as a reminder to enhance `importOrder`for Groovy.The current grEclipse version (better to say the underlying groovy-eclipse) has problems with bounded wildcards. It raises an exception when trying to create the AST. Maybe the issue has been fixed. The current grEclipse is based on a groovy-eclipse V2.9.1 patch, whereas the original version had been released in 2014. Beginning of this year v2.9.2 has been released which provides quite some refactoring including the offending code (see previous comment). I’ll provide an upgrade of grEclipse.