RFR: 6635: Add whitespace rule to JMC jcheck configuration
Marcus Hirt
hirt at openjdk.org
Mon Nov 18 13:02:45 UTC 2019
On Mon, 18 Nov 2019 08:26:11 GMT, Christoph Langer <clanger at openjdk.org> wrote:
> On Mon, 18 Nov 2019 08:25:14 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>
>> On Fri, 15 Nov 2019 23:16:27 GMT, Marcus Hirt <hirt at openjdk.org> wrote:
>>
>>> On Fri, 15 Nov 2019 22:19:25 GMT, Marcus Hirt <hirt at openjdk.org> wrote:
>>>
>>>> On Fri, 15 Nov 2019 21:51:58 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>>>>
>>>>> This is my first PR with skara :)
>>>>>
>>>>> I think it would be nice if jcheck would also check for unnecessary whitespace.
>>>>>
>>>>> ----------------
>>>>>
>>>>> Commits:
>>>>> - e201163f: 6635: Add whitespace rule to JMC jcheck configuration
>>>>>
>>>>> Changes: https://git.openjdk.java.net/jmc/pull/4/files
>>>>> Webrev: https://webrevs.openjdk.java.net/jmc/4/webrev.00
>>>>> Issue: https://bugs.openjdk.java.net/browse/JMC-6635
>>>>> Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
>>>>> Patch: https://git.openjdk.java.net/jmc/pull/4.diff
>>>>> Fetch: git fetch https://git.openjdk.java.net/jmc pull/4/head:pull/4
>>>>
>>>> When I discussed this with Erik (Helin), he told me there could be a problem with us using tabs instead of spaces. I think we should instead try to make spotless part of the process.
>>>
>>> I added a PR for a first trial run with spotless here: #5, let me know what you think!
>>
>>> When I discussed this with Erik (Helin), he told me there could be a problem with us using tabs instead of spaces. I think we should instead try to make spotless part of the process.
>>
>> What could be the problems? I think we would not want to have tabs in java code, would we?
>
>> I added a PR for a first trial run with spotless here: #5, let me know what you think!
>
> Cool. I'll look into it.
> > When I discussed this with Erik (Helin), he told me there could be a problem with us using tabs instead of spaces. I think we should instead try to make spotless part of the process.
>
> What could be the problems? I think we would not want to have tabs in java code, would we?
JMC is formatting code with tabs. One indentation level is one tab.
So, if you want to read your code with 2 spaces for one indentation step:
https://github.com/openjdk/jmc/blob/master/core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/IMCMethod.java?ts=2
And if you want to read your code with 6 spaces for one indentation step:
https://github.com/openjdk/jmc/blob/master/core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/IMCMethod.java?ts=6
So, basically set your IDE to however you like the tabs visualized. One size doesn't fit all, and does not have to. :)
PR: https://git.openjdk.java.net/jmc/pull/4
More information about the jmc-dev
mailing list