RFR: 8311227: Add .editorconfig so IDEs would pick up the common settings automatically: indent, trim trailing whitespace [v3]

Magnus Ihse Bursie ihse at openjdk.org
Fri Apr 4 14:06:10 UTC 2025


On Tue, 11 Mar 2025 09:12:45 GMT, David Linus Briemann <duke at openjdk.org> wrote:

>> Add an .editorconfig to define indentation, trim trailing whitespace and open curly brace position for C++ and Java.
>> This allows various editors to easily infer basics of the coding style.
>
> David Linus Briemann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   make editorconfig hotspot specific

I still don't think the .editorconfig as suggested here is a good idea. It directly conflicts with the existing logic in jcheck.

Understand me right -- I am all in favor of tightening the structure of our code base. But we can't do that by introducing an .editorconfig that does not match what is currently enforced by jcheck or is the current standard of the code base. Instead, we need to tighten the rules bit by bit, getting buy-in for tighter rules, and ensuring we update and fix all old files. 

I have published an alternative implementation of this issue at https://github.com/openjdk/jdk/pull/24448. That version of .editorconfig has a 1-to-1 correspondence to what is checked by jcheck.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23693#issuecomment-2778823752


More information about the build-dev mailing list