Page MenuHomePhabricator

composer test command cleanup where they use `composer foo`
Open, Needs TriagePublic

Description

In numerous cases we have something like

	"scripts": {
		"test": [
			"composer lint",
			"composer phpcs",
			"minus-x check ."
		],
		"lint": "parallel-lint --exclude vendor .",
		"phpcs": "phpcs -p -s"
	}

But we can use

	"scripts": {
		"test": [
			"@lint",
			"@phpcs",
			"minus-x check ."
		],
		"lint": "parallel-lint --exclude vendor .",
		"phpcs": "phpcs -p -s"
	}

https://codesearch.wmcloud.org/search/?q=%22composer%5Cs&i=nope&files=composer.json%24&excludeFiles=&repos=

Event Timeline

Without spaces to work for me:

		"test": [
			"@lint",
			"@phpcs",
			"minus-x check ."
		],

Error was: You made a reference to a non-existent script @ phpcs

It's entirely possible I added the spaces from memory :)