humanmade / linter-bot

Automatically run the HM Coding Standards on any repository.
https://github.com/apps/hm-linter
16 stars 3 forks source link

Only set installed_paths if there's no default #123

Open rmccue opened 4 years ago

rmccue commented 4 years ago

Obsoletes #108. Fixes #97.

This checks for the presence of phpcs' internal configuration file (i.e. the one use for --config-set/etc) at vendor/squizlabs/php_codesniffer/CodeSniffer.conf. When dealerdirect/phpcodesniffer-composer-installer is required, it runs phpcs --config-set installed_paths ... after any package is added or removed. This creates the config file.

Installed paths are now only set manually if there's no configuration, allowing us to bundle this properly into the standard instead.

rmccue commented 4 years ago

Tested with 0.4.2 (which doesn't have the conf file, so defaults are set correctly) and latest (which does, and uses that instead) and all works well. 👍

rmccue commented 4 years ago

Ah nope, this still needs updating. My bad.