Closed dingo-d closed 1 year ago
I couldn't care either way as I don't use the scripts.
I'm not too bothered, but composer test:check-cs
is a lot longer than just composer cs
. Any CLI auto-complete then needs extra work; will pause at test:
rather than actually autocompleting where as composer l
followed by tab would likely have the lint-ci option as one of the only commands.
Namespaces don't really matter too much, because we;re not going to be using the same name as an existing Composer command or Composer extension/plugin. If namespacing was important, then it we'd want a wpcs
prefix, and then it starts getting silly.
Unless you feel particularly strongly, I'd leave the prefixes out.
You can still have composer test
as a catch-all command without adding prefixes.
Makes sense.
When I think about it, leaving them as is makes it a smaller churn (no need to change the workflow files, etc.). I'll create a PR with the addition of one group command, and the explanations of what each custom script command does 👍🏼
Is your feature request related to a problem?
Should we maybe put all the scripts that are used for testing purposes (lint checks, cs checks, tests, check-complete, etc.) under one namespace (say
test
)?That way all the commands would be nicely grouped together when typing the
composer
command like this:In addition to the above, we can also group them in one
test
command so that we can run just thecomposer test
to run all of them which can be useful when working on sniffs.Describe the solution you'd like
The following scripts:
lint
,lint-ci
,check-cs
,run-tests
,check-complete
orcheck-complete-strict
would be prefixed withtest:
prefixAnd we'd add the following script to the scripts list as well:
That would run all the 'tests' at once when the
composer test
is executed.The impact is minimal, as only the workflows and Changelog would need to be updated (not sure if we have anything in the wiki, but that is also easy to update).
We could also add script descriptions to explain what each command is doing.
Any thoughts?