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

Small updates: Use new functions introduced in #273; update HTTP wait function; update URL in README.md; update tests #281

Merged
merged 19 commits into from
Jul 12, 2022

Conversation

gudmdharalds
Copy link
Contributor

@gudmdharalds gudmdharalds commented Jun 24, 2022

This patch will make use of a new function, vipgoci_array_push_uniquely(), which was introduced in #273, across the codebase where applicable. Also, this patch ensures that forced waiting between HTTP requests only happens for GitHub API requests.

  • Use vipgoci_array_push_uniquely() in lint-scan.php and phpcs-scan.php.
  • Use vipgoci_github_files_affected_by_commit() in:
    • ap-file-types.php
    • auto-approval.php
    • lint-scan.php
    • phpcs-scan.php
  • Re-group defines in defines.php
  • Use info, error, warning constants in defines.php
  • Update vipgoci_http_api_wait() so that forced waiting between HTTP requests only happens for GitHub API requests.
  • Update tests
    • Update test for vipgoci_http_api_wait()
    • Test already existing for vipgoci_array_push_uniquely()
  • Check status of automated tests
  • Changelog entry (for VIP) [ Changelog for version 1.3.0 #286 ]

@gudmdharalds gudmdharalds self-assigned this Jun 24, 2022
@gudmdharalds gudmdharalds added this to the 1.2.4 milestone Jun 24, 2022
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.


Scan run detail

Software versions

  • vip-go-ci version: 1.2.3
  • PHP runtime version for vip-go-ci: 8.1.7
  • PHP runtime for linting:
    • PHP 8.1: 8.1.7
  • PHP runtime version for PHPCS: 7.4.30
  • PHPCS version: 3.6.2
  • PHP runtime version for SVG scanner: 7.4.30

Options file (.vipgoci_options)

Options file enabled: true

Configurable options:

  • skip-execution
  • skip-draft-prs
  • lint-modified-files-only
  • phpcs
  • phpcs-severity
  • phpcs-sniffs-include
  • phpcs-sniffs-exclude
  • report-no-issues-found
  • review-comments-sort
  • review-comments-include-severity
  • post-generic-pr-support-comments
  • review-comments-sort
  • scan-details-msg-include
  • svg-checks
  • autoapprove
  • autoapprove-php-nonfunctional-changes
  • hashes-api

Options altered:

  • phpcs-severityset to1
  • phpcs-sniffs-includeset toGeneric.PHP.DisallowShortOpenTag, Squiz.PHP.CommentedOutCode
  • phpcs-sniffs-excludeset toWordPress.Security.EscapeOutput, WordPress.PHP.DevelopmentFunctions, WordPress.WP.AlternativeFunctions, WordPress.PHP.DiscouragedPHPFunctions, WordPress.Files.FileName, Squiz.Commenting.FileComment, Generic.PHP.Syntax
  • skip-draft-prsset to

PHP lint options

PHP lint files enabled: true

Lint modified files only: true

Directories not PHP linted:

  • None

SVG configuration

SVG scanning enabled: true

Auto-approval configuration

Auto-approvals enabled: true

Non-functional changes auto-approved: true

Auto-approval DB enabled: true

Auto-approved file-types:

  • css
  • csv
  • eot
  • gif
  • gz
  • ico
  • ini
  • jpeg
  • jpg
  • json
  • less
  • map
  • md
  • mdown
  • mo
  • mp4
  • otf
  • pcss
  • pdf
  • po
  • pot
  • png
  • sass
  • scss
  • styl
  • ttf
  • txt
  • woff
  • woff2
  • yml

PHPCS configuration

PHPCS scanning enabled: true

PHPCS severity level: 1

Standard(s) used:

  • PHPCompatibility
  • PHPCompatibilityParagonieRandomCompat
  • PHPCompatibilityParagonieSodiumCompat
  • VariableAnalysis
  • WordPress

Runtime set:

  • testVersion 8.1-

Custom sniffs included:

  • Generic.PHP.DisallowShortOpenTag
  • Squiz.PHP.CommentedOutCode

Custom sniffs excluded:

  • WordPress.Security.EscapeOutput
  • WordPress.PHP.DevelopmentFunctions
  • WordPress.WP.AlternativeFunctions
  • WordPress.PHP.DiscouragedPHPFunctions
  • WordPress.Files.FileName
  • Squiz.Commenting.FileComment
  • Generic.PHP.Syntax

Directories not PHPCS scanned:

  • tests/unit

http-functions.php Outdated Show resolved Hide resolved
@wpcomvip-vipgoci-bot wpcomvip-vipgoci-bot dismissed their stale review June 24, 2022 13:46

Dismissing review as all inline comments are obsolete by now

@gudmdharalds gudmdharalds changed the title Use new array function introduced in #273; update HTTP wait function Use new array function introduced in #273; update HTTP wait function; update URL in README.md Jun 24, 2022
@gudmdharalds gudmdharalds changed the title Use new array function introduced in #273; update HTTP wait function; update URL in README.md Small updates: Use new array function introduced in #273; update HTTP wait function; update URL in README.md Jun 24, 2022
@gudmdharalds gudmdharalds changed the title Small updates: Use new array function introduced in #273; update HTTP wait function; update URL in README.md Small updates: Use functions introduced in #273; update HTTP wait function; update URL in README.md Jun 30, 2022
@gudmdharalds gudmdharalds changed the title Small updates: Use functions introduced in #273; update HTTP wait function; update URL in README.md Small updates: Use new functions introduced in #273; update HTTP wait function; update URL in README.md Jul 1, 2022
@gudmdharalds gudmdharalds removed this from the 1.2.4 milestone Jul 5, 2022
@gudmdharalds gudmdharalds changed the title Small updates: Use new functions introduced in #273; update HTTP wait function; update URL in README.md Small updates: Use new functions introduced in #273; update HTTP wait function; update URL in README.md; update tests Jul 8, 2022
@wpcomvip-vipgoci-bot
Copy link
Collaborator

No issues were found to report when scanning latest commit (commit-ID: 9088745)


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



Scan run detail

Software versions

  • vip-go-ci version: 1.2.3
  • PHP runtime version for vip-go-ci: 8.1.8
  • PHP runtime for linting:
    • PHP 8.1: 8.1.8
  • PHP runtime version for PHPCS: 7.4.30
  • PHPCS version: 3.6.2
  • PHP runtime version for SVG scanner: 7.4.30

Options file (.vipgoci_options)

Options file enabled: true

Configurable options:

  • skip-execution
  • skip-draft-prs
  • lint-modified-files-only
  • phpcs
  • phpcs-severity
  • phpcs-sniffs-include
  • phpcs-sniffs-exclude
  • report-no-issues-found
  • review-comments-sort
  • review-comments-include-severity
  • post-generic-pr-support-comments
  • review-comments-sort
  • scan-details-msg-include
  • svg-checks
  • autoapprove
  • autoapprove-php-nonfunctional-changes
  • hashes-api

Options altered:

  • phpcs-severityset to1
  • phpcs-sniffs-includeset toGeneric.PHP.DisallowShortOpenTag, Squiz.PHP.CommentedOutCode
  • phpcs-sniffs-excludeset toWordPress.Security.EscapeOutput, WordPress.PHP.DevelopmentFunctions, WordPress.WP.AlternativeFunctions, WordPress.PHP.DiscouragedPHPFunctions, WordPress.Files.FileName, Squiz.Commenting.FileComment, Generic.PHP.Syntax
  • skip-draft-prsset to

PHP lint options

PHP lint files enabled: true

Lint modified files only: true

Directories not PHP linted:

  • None

SVG configuration

SVG scanning enabled: true

Auto-approval configuration

Auto-approvals enabled: true

Non-functional changes auto-approved: true

Auto-approval DB enabled: false

Auto-approved file-types:

  • css
  • csv
  • eot
  • gif
  • gz
  • ico
  • ini
  • jpeg
  • jpg
  • json
  • less
  • map
  • md
  • mdown
  • mo
  • mp4
  • otf
  • pcss
  • pdf
  • po
  • pot
  • png
  • sass
  • scss
  • styl
  • ttf
  • txt
  • woff
  • woff2
  • yml

PHPCS configuration

PHPCS scanning enabled: true

PHPCS severity level: 1

Standard(s) used:

  • PHPCompatibility
  • PHPCompatibilityParagonieRandomCompat
  • PHPCompatibilityParagonieSodiumCompat
  • VariableAnalysis
  • WordPress

Runtime set:

  • testVersion 8.1-

Custom sniffs included:

  • Generic.PHP.DisallowShortOpenTag
  • Squiz.PHP.CommentedOutCode

Custom sniffs excluded:

  • WordPress.Security.EscapeOutput
  • WordPress.PHP.DevelopmentFunctions
  • WordPress.WP.AlternativeFunctions
  • WordPress.PHP.DiscouragedPHPFunctions
  • WordPress.Files.FileName
  • Squiz.Commenting.FileComment
  • Generic.PHP.Syntax

Directories not PHPCS scanned:

  • tests/unit

@gudmdharalds gudmdharalds added this to the 1.3.0 milestone Jul 12, 2022
@gudmdharalds gudmdharalds merged commit d43ed67 into add-wpscan-support Jul 12, 2022
@gudmdharalds gudmdharalds deleted the updates-relating-to-pr273 branch July 12, 2022 19:29
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.

2 participants