Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation: split line new array not checked #3132

Closed
rnveach opened this issue Apr 26, 2016 · 0 comments · Fixed by #9758
Closed

Indentation: split line new array not checked #3132

rnveach opened this issue Apr 26, 2016 · 0 comments · Fixed by #9758

Comments

@rnveach
Copy link
Member

rnveach commented Apr 26, 2016

$ cat TestClass.java
public class TestClass //indent:0 exp:0
{ //indent:0 exp:0
    int[][] array10b //indent:4 exp:4
= new int[][] { //indent:0 // line 4
                new int[] { 1, 2, 3}, //indent:18
                new int[] { 1, 2, 3}, //indent:18
    }; //indent:4
} //indent:0 exp:0


$ cat TestConfig.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
    <property name="charset" value="UTF-8"/>

    <module name="TreeWalker">
<property name="tabWidth" value="4"/>

    <module name="Indentation">
      <property name="arrayInitIndent" value="4"/>
      <property name="basicOffset" value="4"/>
      <property name="braceAdjustment" value="0"/>
      <property name="lineWrappingIndentation" value="4"/>
    </module>
    </module>
</module>

$ java -jar checkstyle-6.17-all.jar -c TestConfig.xml TestClass.java
Starting audit...
Audit done.

I was expecting some type of violation on line 4, like requiring it to be at column 4 or 8, as it doesn't fit at column 0.

plan3d added a commit to plan3d/checkstyle that referenced this issue Mar 29, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Mar 29, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Mar 30, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Mar 30, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Apr 16, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue May 11, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue May 18, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue May 18, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue May 18, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue May 19, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Jun 30, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Aug 15, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Dec 21, 2021
plan3d added a commit to plan3d/checkstyle that referenced this issue Mar 3, 2022
plan3d added a commit to plan3d/checkstyle that referenced this issue May 3, 2022
romani pushed a commit to plan3d/checkstyle that referenced this issue Dec 2, 2023
romani pushed a commit to plan3d/checkstyle that referenced this issue Dec 11, 2023
@github-actions github-actions bot added this to the 10.12.7 milestone Dec 13, 2023
@romani romani added the bug label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants