« Return to Thread: [ checkstyle-Bugs-2001099 ] Tab is counted as 8 sybmols when column is calculated

[ checkstyle-Bugs-2001099 ] Tab is counted as 8 sybmols when column is calculated

by SourceForge.net :: Rate this Message:

Reply to Author | View in Thread

Bugs item #2001099, was opened at 2008-06-23 18:45
Message generated for change (Comment added) made by javapowered
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=2001099&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Framework
Group: None
Status: Open
Resolution: None
>Priority: 6
Private: No
Submitted By: Oleg Vazhnev (javapowered)
Assigned to: Oliver Burn (oburn)
Summary: Tab is counted as 8 sybmols when column is calculated

Initial Comment:
Tab is counted as 8 sybmols when column is calculated.
I'm not sure that this is a good assumption.
Some redactors uses 4 whitespace for each tab.
Anyway this parameter is configurable.

If the string is obtained to the Java program and then string.length() is called each tab character would add exactly 1.

I think it could be better to change existing behavior of 8 characters per tab to 1 character per tab to simplify automatic fixes of error.

Otherwise we will need to count amount of tab characters in the string and fix column number accordingly.

Please see example attached

<error line="3" column="51" severity="error" message="'(' is preceded with whitespace." source="com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck"/>

column="51" is not good (the length of the string is less then 51 even). We will better to have 51-3*(8-1)=30

----------------------------------------------------------------------

>Comment By: Oleg Vazhnev (javapowered)
Date: 2008-06-23 18:47

Message:
Logged In: YES
user_id=1969193
Originator: YES

This affects almost all checks and so high-priority problem.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=2001099&group_id=29721

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Checkstyle-devel mailing list
Checkstyle-devel@...
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel

 « Return to Thread: [ checkstyle-Bugs-2001099 ] Tab is counted as 8 sybmols when column is calculated

LightInTheBox - Buy quality products at wholesale price!