[wp-trac] [WordPress Trac] #49783: PHPCS config: Persistent caching on Travis

WordPress Trac noreply at wordpress.org
Thu Jun 4 04:17:50 UTC 2020


#49783: PHPCS config: Persistent caching on Travis
------------------------------+-------------------------------
 Reporter:  johnbillion       |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.5
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by jrf):

 > According to https://github.com/squizlabs/PHP_CodeSniffer/issues/530 it
 appears that --cache and --cache=<file> behave differently. The former
 means the cache will not be invalidated if the standard changes, but the
 latter means it will.

 I've run some additional tests with this. Just adding the results here to
 document it.

 When using `--cache` the cache does not get invalidated if the standard
 changes, instead a separate cache file for the files under the other
 standard is created.

 So, in effect, the options actually behave the same when using them.

 The difference is that when using a named cache file, you only have one
 cache file and it gets invalidated and rebuild completely when something
 has changed (either in the ruleset, the sniffs or PHPCS itself), while
 when using the `--cache` option, you have many different cache files
 depending on the options used in a run. When the same options are used
 however, an existing cache will be used.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49783#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list