Commit Graph

15 Commits

Author SHA1 Message Date
Claudio Sanches 3fd42a0fd5 Fixed packages required to run code sniffer on unit tests 2020-08-07 13:28:41 -03:00
Peter Fabian 8c0bf2795f Install sniffs only when running PHPCS. 2019-07-04 10:17:39 +02:00
Rodrigo Primo bb78174c33 Remove references to apigen from configuration files
Commit d6bd82865c removed apigen from
WooCommerce core repository as we are moving it to its own repository (https://github.com/woocommerce/woocommerce-api-docs). This
commit removes the apigen from configuration files. In most cases, it is
just removing the apigen directory from the exclude list of things like
PHPCS and Code Climate.
2019-06-28 10:20:30 -03:00
Rodrigo Primo 61a096d871 Fix PHPCS in the Travis builds
PR https://github.com/woocommerce/woocommerce/pull/23082 made some changes to the Travis configuration and one of those changes broke the PHPCS when running inside Travis with the following error:

```
ERROR: Referenced sniff "WooCommerce-Core" does not exist
```

For example: https://travis-ci.org/woocommerce/woocommerce/jobs/509471213#L659

This problem went unnoticed during the PR review as no PHP file was modified in it and thus there was no file for PHPCS to check.

This commit fixes the error above by installing the Composer package `woocommerce/woocommerce-sniffs` which is the package that provides `WooCommerce-Core` sniffs and which installs `wp-coding-standards/wpcs` as one of its requirements. I couldn't find an easy way to make this work installing `woocommerce/woocommerce-sniffs` globally so that is why this commit also removes the `global` parameter when calling composer.
2019-03-21 15:23:42 -03:00
Gerhard b105550b47 Changes to travis, globally install phpunit and wpcs when required, cache vendor and composer cache directories 2019-03-19 13:14:42 +02:00
Mike Jolley 34dbf96847
Merge pull request #22410 from woocommerce/remove/simplify-commerce
Remove simplify commerce gateway from core
2019-02-04 11:23:23 +00:00
Gerhard cadcad2c6a Add the -s param to the PHPCS command to see the rules it is failing again when running the precommit hook. 2019-01-17 13:23:14 +02:00
Mike Jolley 9d381d456b Remove simplify commerce gateway 2019-01-10 12:01:27 +00:00
Rodrigo Primo bf052c14c7 Use default name for PHPCS configuration file
This commit renames PHPCS configutarion file to `phpcs.xml`. With the default name, it is not necessary to use the argument `--standard=phpcs.ruleset.xml` anymore when calling `phpcs`.
2017-12-18 11:49:44 -02:00
Rodrigo Primo 47154cf29a Don't run PHPCS on the code coverage Travis job
PR #17680 added a new PHP 7.1 Travis build job to generate code coverage report. PHPCS was configured to run on all PHP 7.1 build jobs. So this means that after #17680 was merged, Travis started running PHPCS twice.

This commit fixes this issue by setting a new environment variable called `$RUN_PHPCS` and using this variable, instead of the PHP version, to decide when to run PHPCS.
2017-11-21 18:17:55 -02:00
Claudio Sanches b775074900 Fixed includes/wc-webhook-functions.php and removed debug 2017-10-10 12:59:04 -03:00
Claudio Sanches 2bd240ab15 Debug 2017-10-10 11:27:52 -03:00
Claudio Sanches f479d916e5 Fixed syntax error on phpcs.sh 2017-10-10 09:34:47 -03:00
Claudio Sanches 01cafe62d8 Updated phpcs.sh 2017-10-09 22:16:25 -03:00
Claudio Sanches ab04636ef0 Adds PHPCS in Travis CI 2017-10-09 17:31:15 -03:00