openrewrite / openrewrite/rewrite
Pick TabsAndIndentsStyle from .editorconfig
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 570
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Description
What problem are you trying to solve?
I am trying to duplicate the configuration between .editorcofig and OpenRewrite.
Describe the solution you'd like
I would like OpenRewrite to infer TabsAndIndentsStyle settings from https://editorconfig.org/ settings
Have you considered any alternatives or workarounds?
Frankly speaking, I have not.
Additional context
https://editorconfig.org/ is a well-known standard for configuring common IDE settings, and many IDEs support .editorconfig files natively.
It would be great if OpenRewrite could reuse the settings from there.
.editorconfig settings are flexible: the settings can be divided into several files, and the indent style can vary across files.
See https://github.com/pgjdbc/pgjdbc/blob/9cf9f36a1d3a1edd9286721f9c0b9cfa9e8422e3/.editorconfig#L31-L43
Are you interested in contributing this feature to OpenRewrite?
I am about to integrate OpenRerwite, so I am not sure I would have time to implement editorconfig support.
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.
Research direction
Start by locating TabsAndIndentsStyle and the existing style-configuration entry points in OpenRewrite, then compare them with the linked .editorconfig example. Determine how settings from multiple files and file-specific sections should be selected. Done means .editorconfig settings can be used to infer the relevant TabsAndIndentsStyle values for each applicable file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100