Menu

#23 Wrong indentation level for curly braces on new line

Fixed
nobody
None
Medium
Defect
2012-01-30
2012-01-17
Anonymous
No

Originally created by: compufr...@gmail.com

phpcheckstyle seems to expect that curly braces on a new line should be idented the same level as the body, instead of the same level as the function definition:

function foo()
{ //It wants this bracket to be indented
    //code
} //And this bracket too

Related

Wiki: History

Discussion

  • Anonymous

    Anonymous - 2012-01-17

    Originally posted by: tch...@hotmail.com

    Thanks for the report, I will have a look as soon as possible.

     
  • Anonymous

    Anonymous - 2012-01-17

    Originally posted by: tch...@hotmail.com

    If think I have isolated the problem.

    The rule "checkWhiteSpaceBefore" is launched in case of "new line" and "same line" styles.

    If have updated the file so that the rule is only launch in case of "same line" style.

    Can you try the attached file and see if it corrects you problem ?

    If this is correct I may to generalise the solution.

    Status: Accepted

     
  • Anonymous

    Anonymous - 2012-01-30

    Originally posted by: tch...@hotmail.com

    (No comment was entered for this change.)

    Status: Fixed

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.