Bug #9460

Detect whitespaces in intention in TYPO3.WhiteSpace.DisallowSpaceIndent

Added by Stefano Kowalke over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:2010-08-25
Priority:Must have Due date:2010-08-25
Assignee:Stefano Kowalke % Done:

100%

Category:Whitspaces Spent time: 2.00 hours
Target version:Initial release Estimated time:2.00 hours
Branch: Tags:
Votes: 0

Description

If a code line intend with a mix as tabs and spaces the sniffer don't marks this as an error.

[tab][space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";

Add unit testcase for this and fix the sniff to detect whitespaces inside the intention part of a line.

History

Updated by Stefano Kowalke over 2 years ago

  • Due date set to 2010-08-25
  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Estimated time set to 2.00

Fixed in r2177

Updated by Stefano Kowalke over 2 years ago

  • Status changed from Resolved to Rejected

There are two exceptions when whitespaces are allowed and the sniff not take into accout at the moment.

This belongs to doc comments, which are allowed to indent with one single whitespace at the second line up to the end.

/**
 * This is a doc comment. Its allowed to indent the second line (up to the end) with one single   
 * whitespace
 */

The same is true for this kind of comments. They are internally no doc comments, but normal comments and are used to separate the code into parts
/***********************
 * This is no doc comment, 
 * but a normal comment (T_COMMENT),
 ***********************/

Updated by Stefano Kowalke over 2 years ago

  • Status changed from Rejected to Resolved

Fixed in r2178

Updated by Stefano Kowalke over 2 years ago

  • Target version set to Initial release

Updated by Stefano Kowalke over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF