Skip to content

Conversation

@pschultz
Copy link
Contributor

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
Copy link
Member

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
Copy link
Contributor Author

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

@gsherwood gsherwood merged commit 92dd311 into squizlabs:master Mar 24, 2014
@gsherwood
Copy link
Member

Thanks for doing that. Merged cleanly now.

@pschultz pschultz 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 GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants