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

Improper report of right curly should be on newline when actual problem is right parenthi #3791

Closed
RickPoleshuck opened this issue Feb 2, 2017 · 3 comments

Comments

@RickPoleshuck
Copy link

RickPoleshuck commented Feb 2, 2017

*************** Source File *******************
package com.test;

import java.io.FileInputStream;
import java.io.InputStream;

/**
 * Created by Rick Poleshuck on 2/2/2017.
 */
public class Main {
  public static void main(final String args) throws Exception {
    try (
        InputStream is = new FileInputStream("test")) {

    }
  }
}
*************** pom.xml *******************
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.test</groupId>
    <artifactId>checkstyle-bug</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>7.5</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
*************** Output *******************
[ERROR] src\main\java\com\test\Main.java:[12,53] (blocks) RightCurly: '}' at column 53 should have line break before.
*************** Expected *******************
[ERROR] src\main\java\com\test\Main.java:[12,53] (blocks) RightParen: ')' at column 53 should have line break before.
@rnveach
Copy link
Member

rnveach commented Feb 2, 2017

duplicate of #3776 , the issue was fixed and will be in hot-fix release.

@romani I am going to leave this open since this is the 4th time people are reporting this issue. Hopefully if they see the open issue they will stop.
Maybe make a special label for this kind of repeat fixed issue that hasn't been released yet.

@romani
Copy link
Member

romani commented Feb 2, 2017

agree, lets keep it open till hotfix release.
hot fix release will be on February 5th.

@romani
Copy link
Member

romani commented Feb 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants