Commit 8ab0feb
authored
Add logic to skip files with more than 15000 lines (#186)
* Add logic to skip files with more than 15000 lines
History:
Add validation
Add file validation
Introduce file validation before phpcs scan
Add submit message about skipped files to GH
Update validation
Refactor to apply validation as an array
Remove unnecessary function
Fix unit test
Add require for file validation
Modify test to assert equals instead of same
Currently, it's been trying to assert two different objects, when
the object only need to have the same attribute values
Fix small issue
Stops forcing for tests
Fix array structure for svg scan
Add skip-file logic into a separated file
Add validation/skip files logic in the lint scan
Add verification to check if the file is skipped
Add back code block removed by mistake during rebase
Add test for skipped files due to limit of lines exceeded
Return 250 when skipped files due to files exceeded issue
Add tests for skip files funtions
Move message functions for skipped files to skip-file
Adds test
Address bot comments
Add filename in the output for file validation
Add comment to explain why bot returns non-zero when find skipped files
Add code removed by rebase
Add strict types/return types for the new files.
Sanitizes and verify if line count command output is numeric
Fix test mock
Fix verification if files has been already scanned in php-cs process
Add cache layer to file validation
Replace assertequals with assertsame
Refactor cache logic to use cache key as array and value as string
* Add option skip-large-files
* Apply automattic indent in the modified test files
* Add option skip-large-files-limit
Default is set to 15000
* Add helper for new parameters skip-large-file and limit1 parent 1ffdc92 commit 8ab0feb
File tree
17 files changed
+1584
-335
lines changed- tests
17 files changed
+1584
-335
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2593 | 2593 | | |
2594 | 2594 | | |
2595 | 2595 | | |
2596 | | - | |
2597 | 2596 | | |
2598 | 2597 | | |
2599 | 2598 | | |
| |||
2602 | 2601 | | |
2603 | 2602 | | |
2604 | 2603 | | |
2605 | | - | |
| 2604 | + | |
| 2605 | + | |
2606 | 2606 | | |
2607 | 2607 | | |
2608 | 2608 | | |
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
2721 | 2731 | | |
2722 | 2732 | | |
2723 | 2733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| |||
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| 262 | + | |
261 | 263 | | |
262 | 264 | | |
263 | 265 | | |
| |||
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
282 | 309 | | |
283 | 310 | | |
284 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
| 231 | + | |
| 232 | + | |
227 | 233 | | |
228 | 234 | | |
229 | 235 | | |
| |||
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
| 389 | + | |
383 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
384 | 398 | | |
385 | 399 | | |
386 | 400 | | |
| |||
813 | 827 | | |
814 | 828 | | |
815 | 829 | | |
| 830 | + | |
| 831 | + | |
816 | 832 | | |
817 | 833 | | |
818 | 834 | | |
819 | | - | |
820 | 835 | | |
821 | 836 | | |
822 | 837 | | |
| |||
829 | 844 | | |
830 | 845 | | |
831 | 846 | | |
| 847 | + | |
| 848 | + | |
832 | 849 | | |
833 | 850 | | |
834 | 851 | | |
| |||
1654 | 1671 | | |
1655 | 1672 | | |
1656 | 1673 | | |
1657 | | - | |
| 1674 | + | |
1658 | 1675 | | |
1659 | 1676 | | |
1660 | 1677 | | |
| |||
1671 | 1688 | | |
1672 | 1689 | | |
1673 | 1690 | | |
1674 | | - | |
| 1691 | + | |
1675 | 1692 | | |
1676 | 1693 | | |
1677 | 1694 | | |
| |||
1889 | 1906 | | |
1890 | 1907 | | |
1891 | 1908 | | |
1892 | | - | |
| 1909 | + | |
| 1910 | + | |
1893 | 1911 | | |
1894 | 1912 | | |
1895 | 1913 | | |
| |||
1902 | 1920 | | |
1903 | 1921 | | |
1904 | 1922 | | |
1905 | | - | |
| 1923 | + | |
| 1924 | + | |
1906 | 1925 | | |
1907 | 1926 | | |
1908 | 1927 | | |
| |||
0 commit comments