Conversation

pschultz

PHP_CodeSniffer_Reports_Full assumes that line numbers in the report are numeric. This isn't always the case. We use this class to display custom reports and that yield line ranges, such as "112 - 118".

So, if a report has two messages, for lines "156 - 172" and "27", the width for the line column is determined as 2, because "27" > "156 - 172".

This PR calculates the actual maximum string length.

@gsherwood

This PR isn't showing any changes, but it looks like the commit is here: classmarkets@49429f1

Looks like a good change, so I'll merge it in if you can add that code to the PR.

@pschultz

I guess changing branch names after submitting a pull request isn't a good idea :)

@gsherwoodgsherwood merged commit 92dd311 into squizlabs:master Mar 24, 2014
@gsherwood

Thanks for doing that. Merged cleanly now.

@pschultzpschultz deleted the linenumbers branch March 24, 2014 15:28
jrfnl added a commit to jrfnl/PHP_CodeSniffer that referenced this pull request Jul 29, 2024
…-embeddedphp-support-short-open-tag

Squiz/EmbeddedPhp: add support for short open tag and various bug fixes
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.