Add logic to skip files with more than 15000 lines#186
Merged
ariskataoka merged 5 commits intomasterfrom Jul 15, 2021
Merged
Conversation
e2386ee to
b59b1c1
Compare
gudmdharalds
suggested changes
Jul 5, 2021
Contributor
gudmdharalds
left a comment
There was a problem hiding this comment.
This looks very good!
I left only a few comments inline.
gudmdharalds
reviewed
Jul 5, 2021
0f653a8 to
c01757d
Compare
wpcomvip-vipgoci-bot
previously requested changes
Jul 8, 2021
Collaborator
wpcomvip-vipgoci-bot
left a comment
There was a problem hiding this comment.
phpcs scanning turned up:
🚫 1 error
This bot provides automated PHP linting and PHPCS scanning. For more information about the bot and available customizations, see our documentation.
c1a7c58 to
65cc116
Compare
Dismissing review as all inline comments are obsolete by now
8fb7e33 to
12f4376
Compare
gudmdharalds
suggested changes
Jul 9, 2021
Contributor
gudmdharalds
left a comment
There was a problem hiding this comment.
Hi,
I reviewed and this PR is looking excellent.
There is just one small issue I noted, and when that is resolved this PR can be merged.
Can you have a look?
Thanks!
46d6324 to
fa34e04
Compare
gudmdharalds
approved these changes
Jul 12, 2021
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
Default is set to 15000
fa34e04 to
04df222
Compare
ariskataoka
added a commit
that referenced
this pull request
Jul 13, 2021
ariskataoka
added a commit
that referenced
this pull request
Aug 25, 2021
* Adding changelog entry * Updating version * Update merge SHA * Add PR #186 to the changelog * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Ariana Kataoka <aris.kataoka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR; Some builds are currently timing out due to PRs that contain too large files.
This PR addresses issue 147.
If the PR contains files with more than 15000 lines, the lint scan and the phpcs will skip it.
TODO:
Obs.:
Tested manually with lint and php-cs on and off: Only exceeded lines failed - cache tests ariskataoka/vipgoci-tests#10 (review)
The build testing has constantly been failing due to the GH API limit rate.