Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break vipgoci_run() into multiple functions #207

Merged
merged 222 commits into from
Feb 9, 2022

Conversation

gudmdharalds
Copy link
Contributor

@gudmdharalds gudmdharalds commented Sep 7, 2021

The vipgoci_run() function is getting long and difficult to understand. It needs to be broken into multiple functions.

This pull request will move the various configuration of options, sanity checking and eventual scanning performed in vipgoci_run() into multiple functions. Each newly created function will have specific focus; for example, PHP Linting functionality will be configured and run from two different functions.

This has already been done in the vip-go-compatibility-scanner project, see here -- a similar solution is being implemented here.

This resolves #192.

TODO:

  • Break vipgoci_run() into multiple functions grouped by functionality.
  • Use declare(strict_types=1); for vip-go-ci.php, main.php, latest-release.php, github-commit-status.php [ Define variable types, declare strict types, WordPress coding standard #157 ]
  • Add unit-tests as needed
  • Add or update PHPDoc comments for new or updated functions (main code only).
  • Ensure all variables have types defined (added or changed code only)
  • Changelog entry [ Changelog for version 1.2.0 #243 ]
  • Check automated unit-tests
  • Consistent test names
  • Test major components manually (PHP linting, PHPCS).
  • Verify that results is filtered and posted.
  • Verify that options are parsed and used.
  • Manual testing
    • Pull request with PHP linting issues
    • Pull request with PHPCS issues
    • Pull request without PHPCS issues, not auto-approved
    • Pull request without PHPCS issues, is auto-approved
    • Pull request with SVG issues
    • Pull request with large file to be skipped

@gudmdharalds gudmdharalds self-assigned this Sep 7, 2021
@gudmdharalds gudmdharalds marked this pull request as draft September 7, 2021 16:58
Copy link
Collaborator

@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpcs scanning turned up:

⚠️ 1 warning


This bot provides automated PHP linting and PHPCS scanning. For more information about the bot and available customizations, see our documentation.

main.php Show resolved Hide resolved
Copy link
Collaborator

@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

results.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

tests/integration/Skeleton.php Show resolved Hide resolved
@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot dismissed their stale review February 8, 2022 21:41

Dismissing review as all inline comments are obsolete by now

Copy link
Collaborator

@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpcs scanning turned up:

⚠️ 1 warning


This bot provides automated PHP linting and PHPCS scanning. For more information about the bot and available customizations, see our documentation.

Copy link
Collaborator

@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpcs scanning turned up:

🚫 1 error

⚠️ 1 warning


This bot provides automated PHP linting and PHPCS scanning. For more information about the bot and available customizations, see our documentation.

github-api.php Show resolved Hide resolved
github-api.php Show resolved Hide resolved
@gudmdharalds gudmdharalds merged commit ae597e0 into main Feb 9, 2022
@gudmdharalds gudmdharalds deleted the update-main-run-multiple-functions branch February 9, 2022 00:50
@gudmdharalds gudmdharalds mentioned this pull request Jun 13, 2022
54 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break vipgoci_run() into multiple functions
2 participants