[ 
https://issues.apache.org/jira/browse/MCHECKSTYLE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514181#comment-14514181
 ] 

Michael Osipov commented on MCHECKSTYLE-291:
--------------------------------------------

Michal, here is the [code 
spot|https://maven.apache.org/plugins/maven-checkstyle-plugin/xref/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.html#L644]:

{code}
if ( logViolationsToConsole )
{
    String line = xpp.getAttributeValue( "", "line" );
    String column = xpp.getAttributeValue( "", "column" );
    String message = xpp.getAttributeValue( "", "message" );
    String rule = RuleUtil.getName( source );
    String category = RuleUtil.getCategory( source );
    
    log( severity, file + '[' + line + ( ( column == null ) ? "" : ( ':' + 
column ) ) + "] ("
    + category + ") " + rule + ": " + message );
}
{code}

How do you intend the column value to be retained?

> Change format of violation message
> ----------------------------------
>
>                 Key: MCHECKSTYLE-291
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-291
>             Project: Maven Checkstyle Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.15
>            Reporter: Michal Kordas
>            Assignee: Michael Osipov
>
> For example on LineLength violation in console I get the following error:
> _\[ERROR] src\test\java\com\test\SampleTest.java *\[89]* (sizes) LineLength: 
> Line is longer than 180 characters (found 202)._
> It would be better to have colon and line number instead of braces, so that I 
> can directly paste the reference to IntelliJ and go to affected line:
> _\[ERROR] src\test\java\com\test\SampleTest.java *:89* (sizes) LineLength: 
> Line is longer than 180 characters (found 202)._
> The same format has exception stacktrace in Java.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to