Skip to content

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented May 31, 2024

Description of the Change

This PR adds in a new GitHub Action Workflow to run PHPCS linting. We set our minimum PHP version to 7.4 and WordPress version to 6.0, but those can both be changed if we want to support older versions of things.

This Workflow is set to run anytime code is pushed to develop or main (and there are PHP files) or when a PR is opened against develop (and there are PHP files). It also only runs on the changed lines of code, not the entire file. This prevents unnecessary changes from creeping into PRs.

Solves one of the issues reported in #12 but there's remaining items, so this PR won't close out that Issue

How to test the Change

Ensure the PHPCS Linting Workflow ran when PHP files changed: https://github.com/mailchimp/wordpress/actions/runs/9312182664/job/25632568100?pr=19

Changelog Entry

Added - PHPCS Linting GitHub Action Workflow

@dkotter dkotter added this to the 1.6.0 milestone May 31, 2024
@dkotter dkotter self-assigned this May 31, 2024
@dkotter dkotter requested a review from jeffpaul May 31, 2024 02:49
Comment on lines +2 to +5
<ruleset name="TenUp PHPCS">
<description>TenUp PHPCS extended.</description>

<rule ref="10up-Default" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we update this to Mailchimp?

@jeffpaul jeffpaul merged commit 10a00f6 into develop May 31, 2024
@vikrampm1 vikrampm1 mentioned this pull request Jun 26, 2024
23 tasks
@jeffpaul jeffpaul deleted the feature/12-phpcs-workflow branch July 1, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants