RFR (S): 8136672: editor configuration for IDEs

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Sep 23 13:01:43 UTC 2015


On 2015-09-18 23:59, Wojtowicz, Tomasz wrote:
> Review Title:      editor configuration for IDEs
> Review ID:          #8136672
> Diff: 		http://cr.openjdk.java.net/~mcberg/8136672/webrev.01
> Description:        In order to avoid jcheck errors like following ones:
> 		"Tests found:
> 		
> 		src/cpu/x86/vm/macroAssembler_x86.cpp:8686: Trailing whitespace
> 		src/cpu/x86/vm/macroAssembler_x86.hpp:1330: Trailing whitespace
> 		src/cpu/x86/vm/stubGenerator_x86_32.cpp:3001: Trailing whitespace
> 		src/cpu/x86/vm/stubGenerator_x86_64.cpp:3968: Trailing whitespace
> 		src/cpu/x86/vm/stubRoutines_x86.cpp:136: Trailing whitespace
> 		src/share/vm/interpreter/interpreter.cpp:594: Carriage return (^M)
> 		src/share/vm/interpreter/templateInterpreter.cpp:426: Carriage return
> 		(^M)
> 		src/cpu/x86/vm/crc32c.h:31: Trailing whitespace"
> 		
> 		I propose to introduce an .editorconfig file which would encapsulate common layout required settings. EditorConfig (http://editorconfig.org/) provides plugins for most popular editors/IDEs and make sure that every modification adheres to the stated rules:
> 		hotspot/.editorconfig file contents
> 		                root = true
> 		
> 		                [*]
> 		                indent_style = space
> 		                indent_size = 2
> 		                end_of_line = lf
> 		                charset = utf-8
> 		                trim_trailing_whitespace = true
> 		                insert_final_newline = true
> Link: 		https://bugs.openjdk.java.net/browse/JDK-8136672
> Author:                Tomasz, Wojtowicz
>
> --
> Thank you,
I've never heard about editorconfig before, but it sounds like a good 
idea. Does it have any real community impact? I noted that most major 
IDEs does not support it natively (yet), so the practical effect is 
probably quite small.

However, your editorconfig files seems incomplete. It should probably 
contain something like
[*.java]
indent_size = 4

as well, although I must admit I didn't study the format close enough to 
understand if you could just override the default indent size like that 
for just java files.

/Magnus


More information about the hotspot-dev mailing list