Allow spotless greclipse.properties to be selected via configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- groovy, java
- Domain
- build-system, tooling
Research direction
Start by examining testlib/src/main/resources/groovy/greclipse/format/greclipse.properties and the greclipse formatter configuration entry point. Compare the referenced Spotless properties with the revised settings in the issue and determine how a named configuration can be selected. Done means projects can choose the configuration without copying the properties file and the resulting formatting matches the documented settings.
Written by the indexing model from the issue text.
Description
The default formatting configuration of greclipse isn't very standard or desirable. However, spotless configures greclipse.properties in a much more standard way.
For example, compare the default formatting of googleJavaFormat to greclipse. They're very different.
If you Google site:github.com "greclipse.properties", you will find that many projects simply copied this file as defined by spotless.
Instead of having to copy greclipse.properties into every project, it'd be sweet if we could just select this formatting configuration by spotless via configuration, for example:
<greclipse>
<formatterConfiguration>spotless</file> <!-- default value: eclipse? -->
</greclipse>
EDIT:
Unfortunately, I spoke too soon. I didn't realize spotless's greclipse.properties sets the following (I assume for testing):
groovy.formatter.braces.start=next
groovy.formatter.braces.end=same
These settings aren't very typical. I propose the following settings to stay consistent with googleJavaFormat as well as with examples on the Groovy style guide:
groovy.formatter.braces.end=next
groovy.formatter.braces.start=same
groovy.formatter.longListLength=100
groovy.formatter.multiline.indentation=4
groovy.formatter.remove.unnecessary.semicolons=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
- Dominant language
- Java
- Stars
- 5.7k
- Forks
- 560
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 43
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from diffplug/spotless
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
All issues in diffplug/spotless
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·