haspadar/piqule

Static analysis and linters for PHP projects

Installs: 22

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/haspadar/piqule

v0.5.1 2026-01-07 22:09 UTC

This package is auto-updated.

Last update: 2026-01-08 10:09:37 UTC


README

CI Coverage Mutation testing badge PHPStan Level Psalm

Hits-of-Code CodeRabbit Pull Request Reviews

Piqule provides a distribution of PHP quality policies.

It delivers predefined static analysis rules, CI workflows, and tooling configurations by copying them into project repositories.

Piqule defines a single source of truth for quality policies; conflicts and deviations are resolved explicitly through Git.

Tooling overview

Tool Purpose What Piqule provides
PHPStan Static analysis Strict ruleset and high analysis level
Psalm Static analysis Complementary checks and early error detection
PHP-CS-Fixer Code style Deterministic formatting rules
PHPMD Numeric metrics Size and complexity thresholds (methods, classes)
PMD (CPD) Duplication detection Copy-paste / duplicated code detection
Infection Mutation testing Test quality validation
Markdownlint Markdown linting Consistent documentation style
Hadolint Dockerfile linting Secure and reproducible Dockerfiles
Actionlint CI linting GitHub Actions correctness
Yamllint YAML linting Configuration consistency
Typos Spell checking Low-noise typo detection
Renovate Dependency automation Managed dependency update rules
PR Size Checker Process guard Pull request reviewability enforcement

Installation

Piqule defines quality policies and configuration files. Actual analysis tools are installed explicitly per project.

1) Install Piqule

composer require --dev haspadar/piqule

2) Install PHP analysis tools

composer require --dev \
friendsofphp/php-cs-fixer \
phpunit/phpunit \
phpstan/phpstan \
vimeo/psalm \
phpmd/phpmd \
phpmetrics/phpmetrics \
infection/infection

Configuration synchronization

Copies predefined configuration files into the project, overwriting existing ones. No merging is performed; conflicts are resolved via Git.

bin/piqule.php sync
bin/piqule.php sync --dry-run

Composer scripts (optional)

Piqule provides configuration files for PHP tooling. Composer scripts are project-specific and not enforced.

A reference setup used in this repository: https://github.com/haspadar/piqule/blob/main/composer.json

Docker image

Piqule includes a Dockerfile that builds a Docker image with infrastructure-level linters.

The Docker image contains:

  • actionlint
  • hadolint
  • markdownlint-cli2
  • yamllint
  • typos
  • pmd (CPD)

The Docker image is provided as a ready-to-use local environment for running linters without installing them on the host system. The Docker image is optional and independent of CI workflows.

Before building the Docker image, ensure managed files are synchronized using bin/piqule.php sync.

Example local usage:

docker build -t piqule -f .piqule/Dockerfile .
docker run --rm -v "$PWD:/app" -w /app piqule markdownlint-cli2 "**/*.md"

Contributing

Fork the repository, apply changes, and open a pull request.

Before submitting, ensure all Piqule checks pass locally or in CI.

License

MIT