Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Prefix Composer scripts #60

Open
JoelAlphonso opened this issue Sep 8, 2022 · 0 comments
Open

Suggestion: Prefix Composer scripts #60

JoelAlphonso opened this issue Sep 8, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JoelAlphonso
Copy link
Contributor

JoelAlphonso commented Sep 8, 2022

Originally posted by @mcaskill in #55 (comment)


I would propose prefixing these scripts and even describing them. For example:

{
    "scripts": {
        "fix:phpcbf": "@php vendor/bin/phpcbf -ps --colors packages/*/src/ --ignore=tests/",
        "lint": [
            "@lint:php",
            "@lint:phpcs",
            "@lint:phpstan"
        ],
        "lint:php": "find packages -type f -name '*.php' -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected'; test $? -eq 1",
        "lint:phpcs": "./tests/script/phpcs",
        "lint:phpstan": "@php vendor/bin/phpstan analyse",
        "test": [
            "@test:phpunit"
        ],
        "test:phpunit": "./tests/script/phpunit"
    },
    "scripts-descriptions": {
        "fix:phpcbf": "Fix syntax violations with PHPCS",
        "lint": "Run all linting tools",
        "lint:php": "Run syntax check with PHP",
        "lint:phpcs": "Run syntax check with PHPCS",
        "lint:phpstan": "Run static code analysis with PHPStan",
        "test": "Run all testing tools",
        "test:phpunit": "Run all tests with PHPUnit"
    }
}
@JoelAlphonso JoelAlphonso added the enhancement New feature or request label Sep 8, 2022
@mcaskill mcaskill changed the title Proposition to prefix composer scripts Suggestion: Prefix Composer scripts Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants