Detection of overly long lines with preview of last 100 characters of offenders.#8
Detection of overly long lines with preview of last 100 characters of offenders.#8philemerson wants to merge 1 commit intomikestowe:masterfrom
Conversation
Added option to display results as console output Added optional checking for long lines (with define to select trigger length) Added display of last 100 characters of long lines to help identify false positives Added filtering of input files so PDFs, JPGs etc can be skipped
|
This seems to fix issue #7. |
|
This is a great PR with many useful additions. It's worked well for me. I have a few suggestions though;
|
|
Looks good! Let me just run some tests to make sure I'm not missing anything and then will merge it in! |
|
There seems to be an issue/typo on line 61 - the 2nd and 3rd parameters for str_pad() are reversed (or at least that's what fixed the error I was getting). Here is what worked for me with PHP 5.5.9 and 5.6.30: |
|
str_pad() issue also present with PHP 7.0.18 |
I've added a few features to the code in order to address the problem of long lines and general speed of checking by limiting the process to just PHP files (this can easily be changed in the constant).
Here's the summary:
Added option to disable sending of email
Added option to display results as console output
Added optional checking for long lines (with define to select trigger length)
Added display of last 100 characters of long lines to help identify false positives
Added filtering of input files so PDFs, JPGs etc can be skipped