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

[2.9.1] PEAR.ControlStructures.MultiLineCondition.Alignment infinite loop indent error #1894

Closed
photodude opened this issue Feb 10, 2018 · 4 comments

Comments

@photodude
Copy link
Contributor

photodude commented Feb 10, 2018

I just ported over some changes/fixes from Squiz.Commenting.FunctionComment PHPCS 3.x branch to our custom sniff Joomla.Commenting.FunctionComment (PR with the change is joomla/coding-standards#229 )

For some reason the PEAR.ControlStructures.MultiLineCondition.Alignment is struggling here with the Multi-line IF statements and tab alignment
the same lines give the following errors depending on which indent fix is implemented

Multi-line IF statement not indented correctly; expected 32 spaces but found 28.
https://travis-ci.org/photodude/coding-standards/jobs/339755077
or after fixing by adding one tab and it errors as follows
Multi-line IF statement not indented correctly; expected 28 spaces but found 32.
https://travis-ci.org/photodude/coding-standards/jobs/339755650

Example code erroring
https://github.com/photodude/coding-standards/blob/patch-2/Joomla/Sniffs/Commenting/FunctionCommentSniff.php#L156-L160

Note: I've been doing manual corrections here; I have not been using phpcbf to fix these errors, as such I keep going in circles (infinite loop of opposing indent errors)

@photodude
Copy link
Contributor Author

the verbose output for the specific file that errors with PEAR.ControlStructures.MultiLineCondition.Alignment
https://api.travis-ci.org/v3/job/342660974/log.txt

@gsherwood
Copy link
Member

Sorry, but I've only just gotten to this in my list.

I'm really short on time, so is there any way you could just give me a small snippet of code to reproduce the error + a command I can run to do so using the included sniffs? Or if you need help debugging a custom sniff, just let me know where to grab it from.

@photodude
Copy link
Contributor Author

Closing, unable to replicate.

In trying to get a small file showing the issue I can no longer replicate the issue.
Even the main repo file were the issue was occurring I was able to directly fix the indent issue with no problem.
Not sure what was going on a month ago, but it works correctly now.

@gsherwood
Copy link
Member

No worries. Thanks for getting back to me.

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

No branches or pull requests

2 participants