Skip to content

Instruct wp-dev-lib to check all files not just those in patch#1822

Merged
westonruter merged 1 commit intodevelopfrom
update/check-scope
Jan 17, 2019
Merged

Instruct wp-dev-lib to check all files not just those in patch#1822
westonruter merged 1 commit intodevelopfrom
update/check-scope

Conversation

@westonruter
Copy link
Copy Markdown
Member

After #1810 we no longer need to limit PHPCS to report issues on the lines that were changes in a given PR, which is the default behavior of wp-dev-lib. This was needed because the repo did not adhere to the standards, and so the patch scope limitation allowed us to make incremental improvements over time. This is no longer needed, and the patch scope limitation is going to cause us problems going forward such as when versions of WPCS are updated by Renovate (e.g. #1814), since the composer.json change wouldn't trigger phpcs by default.

@googlebot googlebot added the cla: yes Signed the Google CLA label Jan 16, 2019
@westonruter
Copy link
Copy Markdown
Member Author

See from Travis build that PHPCS is now being invoked even without any PHP files being touched: https://travis-ci.org/ampproject/amp-wp/jobs/480632846#L381-L382

The downside to this change is that the build will take longer, but it seems justified for the sake of consistency.

@westonruter westonruter added this to the v1.1 milestone Jan 16, 2019
@felixarntz
Copy link
Copy Markdown
Collaborator

LGTM. However, for an eventual pre-commit hook we should ensure PHPCS still only runs on the changed files to speed that up. For CI I agree it's not so important as consistency.

@westonruter
Copy link
Copy Markdown
Member Author

Agreed. For that perhaps we should do something like this:

if [ -z $TRAVIS ]; then
    CHECK_SCOPE=all
else
    CHECK_SCOPE=changed-files
fi

@westonruter westonruter merged commit 76b1547 into develop Jan 17, 2019
@westonruter westonruter deleted the update/check-scope branch January 17, 2019 16:06
westonruter added a commit that referenced this pull request Jan 17, 2019
@westonruter
Copy link
Copy Markdown
Member Author

westonruter commented Jan 17, 2019

Agreed. For that perhaps we should do something like this:

Done in f431b29 for #1131.

westonruter added a commit that referenced this pull request Feb 1, 2019
…velop-to-1.0.2

* 'develop' of github.com:ampproject/amp-wp: (26 commits)
  Fix PEAR.Functions.FunctionCallSignature phpcs issues
  Strip old-school CDATA and HTML comments from XHTML-compatible style elements
  Re-simplify condition include_manifest_comment; remove undefined constant
  Add tests for style sanitizer include_manifest_comment option
  Introduce when_css_excluded option for include_manifest_comment arg
  Suppress style[amp-custom] manifest HTML comment when not WP_DEBUG
  Add missing vendor deps to build after #1809
  Update dependency xwp/wp-dev-lib to v1.0.1
  Add wp_generator to classic post template
  Remove Powered by WordPress in classic footer template
  Fix broken unit test as it is just as valid now.
  Remove unnecessary strlen() call.
  Ignore the home URL's path if present when normalizing image URLs.
  Go back to using site_url() in AMP_Style_Sanitizer and harden concatenation of relative URLs.
  Remove redundant composer install
  Only set CHECK_SCOPE=all on Travis (see #1822)
  Improve sanity check instructions in release steps
  Pin wp-dev-lib to 1.0.0
  Eliminate references to submodules from contributing.md
  Remove obsolete DEV_LIB_SKIP of composer
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants