Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
php8.4-pgsql php8.4-sqlite3 php8.4-soap php8.4-xsl php8.4-imagick \
php8.4-memcached php8.4-amqp php8.4-mongodb php8.4-igbinary php8.4-msgpack \
php8.4-uuid php8.4-yaml php8.4-ldap php8.4-gmp php8.4-bz2 php8.4-mailparse \
php8.4-ds unzip composer python3 python3-venv git ca-certificates curl \
php8.4-ds unzip composer python3 python3-venv git patch ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY docker/php/99-code-quality.ini /etc/php/8.4/cli/conf.d/99-code-quality.ini
# TS/JS tools (typescript is required by dependency-cruiser to resolve TS sources)
Expand Down
4 changes: 3 additions & 1 deletion docs/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The image owns policy. Consumer configuration can select languages, paths, exclu

| Check | Language | Tool | Fixed threshold and semantics |
| --- | --- | --- | --- |
| Complexity | TS/JS | Oxlint 1.82.0 | Complexity 10; 60 lines per function excluding blanks and comments; 4 parameters; depth 3; 3 nested callbacks. Only warning diagnostics are accepted. |
| Complexity | TS/JS | Oxlint 1.82.0 | Complexity 10 and 60 lines per function; `.tsx`/`.jsx` use 15 and 120. Lines exclude blanks and comments. Parameters 4; depth 3; nested callbacks 3. Only warning diagnostics are accepted. |
| Complexity | PHP | PHPCS 4.0.4, Slevomat 8.31.1, Runroom standard | Cyclomatic complexity 10; nesting 3; function length 60; parameters 4. |
| Complexity | Python | Ruff 0.16.6 | C901 10; PLR0915 60 statements; PLR0913 4 arguments; PLR1702 3 nested blocks. |
| Cognitive | TS/JS | Fallow 3.23.0 | Values greater than 15 block. |
Expand All @@ -27,6 +27,8 @@ The image owns policy. Consumer configuration can select languages, paths, exclu

Built-in test, generated-file, and framework exclusions apply before these checks. See [Configuration](configuration.md#built-in-exclusions).

When `.venv` or `venv` is present, deptry reads installed distribution metadata there to resolve package names to import modules; symlinked environment directories are ignored. Python dependency setup should install into the consumer virtualenv, for example with `uv sync` or `pip install` targeting `.venv`.

## v1 tool pins

`versions` prints the 15 check-tool binary pins, two library pins, and the image Runtime group; `doctor` verifies the pinned tools and runtime availability.
Expand Down
2 changes: 2 additions & 0 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:

For npm, use `setup: npm ci`. For Composer, use `setup: composer install` or a suitable non-interactive variant such as `setup: composer install --no-interaction`.

Setup is one shell command and may chain installers, for example `setup: composer install --no-interaction && npm ci`. Drupal and Symfony repositories with a frontend need both dependency trees because ts-unused requires `node_modules/`. The image includes `patch`, so Composer patch plugins used by Drupal can apply project patches.

The image supports these dependency setup recipes:

- `setup: pnpm install --frozen-lockfile` — Corepack honors the repository's `packageManager`; pnpm 10.17.1 and 11.5.2 are pre-cached, and other pins download on demand.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "phpcs@4.0.4",
"configHash": "788bbffbbd6d43bd4fcab5854d279bebdf4215471f87f6d6b60cd83bacc49260",
"configHash": "53123ba920bf014cf44db8e33125cc10047ac88c9d3b49e266eb479eb4758c6a",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "phpcs@4.0.4",
"configHash": "788bbffbbd6d43bd4fcab5854d279bebdf4215471f87f6d6b60cd83bacc49260",
"configHash": "53123ba920bf014cf44db8e33125cc10047ac88c9d3b49e266eb479eb4758c6a",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "788bbffbbd6d43bd4fcab5854d279bebdf4215471f87f6d6b60cd83bacc49260",
"configHash": "53123ba920bf014cf44db8e33125cc10047ac88c9d3b49e266eb479eb4758c6a",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "788bbffbbd6d43bd4fcab5854d279bebdf4215471f87f6d6b60cd83bacc49260",
"configHash": "53123ba920bf014cf44db8e33125cc10047ac88c9d3b49e266eb479eb4758c6a",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "fallow@3.23.0",
"configHash": "88b87f9ea62ee2e3991852bd7460e0a27c882032757df6cc05de9aca45a891f5",
"configHash": "00bd4808f9cac65eb405e457499b1f41c7b54da398c2040234612ae1058420ce",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "oxlint@1.82.0",
"configHash": "88b87f9ea62ee2e3991852bd7460e0a27c882032757df6cc05de9aca45a891f5",
"configHash": "00bd4808f9cac65eb405e457499b1f41c7b54da398c2040234612ae1058420ce",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "88b87f9ea62ee2e3991852bd7460e0a27c882032757df6cc05de9aca45a891f5",
"configHash": "00bd4808f9cac65eb405e457499b1f41c7b54da398c2040234612ae1058420ce",
"findings": {}
}
2 changes: 1 addition & 1 deletion fixtures/monorepo-project/quality/ts-unused-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "knip@6.35.1",
"configHash": "88b87f9ea62ee2e3991852bd7460e0a27c882032757df6cc05de9aca45a891f5",
"configHash": "00bd4808f9cac65eb405e457499b1f41c7b54da398c2040234612ae1058420ce",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "fallow@3.23.0",
"configHash": "beaa41f62a18fac8e6869e8c035c9dfc258c4aa2e57aaf93f0db204cf6ff9f00",
"configHash": "867bd69f8d32bc03219a1c955e1b6ce3ffbf8f7b2703c35e534c3f4777e81d1d",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "oxlint@1.82.0",
"configHash": "beaa41f62a18fac8e6869e8c035c9dfc258c4aa2e57aaf93f0db204cf6ff9f00",
"configHash": "867bd69f8d32bc03219a1c955e1b6ce3ffbf8f7b2703c35e534c3f4777e81d1d",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "beaa41f62a18fac8e6869e8c035c9dfc258c4aa2e57aaf93f0db204cf6ff9f00",
"configHash": "867bd69f8d32bc03219a1c955e1b6ce3ffbf8f7b2703c35e534c3f4777e81d1d",
"findings": {}
}
2 changes: 1 addition & 1 deletion fixtures/payload-project/quality/ts-unused-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "knip@6.35.1",
"configHash": "beaa41f62a18fac8e6869e8c035c9dfc258c4aa2e57aaf93f0db204cf6ff9f00",
"configHash": "867bd69f8d32bc03219a1c955e1b6ce3ffbf8f7b2703c35e534c3f4777e81d1d",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "deptrac@4.7.1",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"src/Domain/Entity.php | deptrac:Domain-on-Infrastructure | /class:Entity/method:save": 1,
"src/Infrastructure/Repo.php | deptrac:Infrastructure-on-Domain | /class:Repo/method:store": 1
Expand Down
2 changes: 1 addition & 1 deletion fixtures/php-project/quality/php-cognitive-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "phpcs@4.0.4",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"src/Service/Complex.php | cognitive-complexity | /class:Complex/method:run": 17
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/php-project/quality/php-complexity-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "phpcs@4.0.4",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"src/Service/Complex.php | Generic.Metrics.CyclomaticComplexity | /class:Complex/method:run": 12,
"src/Service/Complex.php | Generic.Metrics.NestingLevel | /class:Complex/method:run": 4,
Expand Down
2 changes: 1 addition & 1 deletion fixtures/php-project/quality/php-duplication-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"4e1f30eae51b9473": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "composer-unused@0.9.6",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"composer.json | unused-package | psr/log": 1,
"composer.json | unused-package | symfony/yaml": 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "phpstan@2.2.13",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"src/Domain/Entity.php | dead-code | /class:Entity/method:save#shipmonk.deadMethod#save": 1,
"src/Service/Complex.php | dead-code | /class:Complex/method:run#shipmonk.deadMethod#run": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "composer-require-checker@4.24.0",
"configHash": "289388ed5f404165811c82fc643dc408cd8010a59eff9dc59e1c78db8c0a1a88",
"configHash": "29ac30fb881c7d568a321486efec2918d30d7bc513767a6849b9b85d64767409",
"findings": {
"composer.json | unknown-symbol | Composer\\InstalledVersions": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "lint-imports@2.15",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"src/demo_app/domain/model.py | import-linter:Layers | demo_app.infra.db": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "complexipy@8.0.1",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"src/demo_app/complex.py | cognitive-complexity | /function:busy": 20
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "ruff@0.16.6",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"src/demo_app/complex.py | C901 | /function:busy": 12,
"src/demo_app/complex.py | PLR0913 | /function:busy": 5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"534ad38acbaa6ef4": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "deptry@0.25.1",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"pyproject.toml | deptry-DEP002 | requests": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "vulture@2.16",
"configHash": "1864e3ffa415a8a465e63df9e079b80fa7770548a924223fd029429878f9b2f0",
"configHash": "f127c3795c6e86c03c5c17e708a386d6a4ca9ea669d3b39e551a3ae768e583b6",
"findings": {
"src/demo_app/client.py | vulture-function | /function:get_client#get_client": 1,
"src/demo_app/complex.py | vulture-function | /function:busy#busy": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "lint-imports@2.15",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "complexipy@8.0.1",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "ruff@0.16.6",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "deptry@0.25.1",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "vulture@2.16",
"configHash": "d6504752db11a714a47a836e496cdf929c1a2b3c6f601a789f7ef0679aedc2bb",
"configHash": "056f6c0e10b0196b5d5258f47bc47bba24ce689a840b404502460ce88043efe6",
"findings": {}
}
2 changes: 1 addition & 1 deletion fixtures/ts-project/quality/ts-architecture-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "depcruise@18.2.0",
"configHash": "09cea93df07b517f2cc1af3418a1bcca1128f0b056897ba948a03afad4aa1609",
"configHash": "61d7745be542a70d4ba2343dd4ab86580e5b290f95f733782b2c43d0923fc861",
"findings": {
"src/ui/view.ts | no-ui-to-db | src/db/repo.ts": 1
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ts-project/quality/ts-cognitive-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "fallow@3.23.0",
"configHash": "09cea93df07b517f2cc1af3418a1bcca1128f0b056897ba948a03afad4aa1609",
"configHash": "61d7745be542a70d4ba2343dd4ab86580e5b290f95f733782b2c43d0923fc861",
"findings": {
"src/cognitive.ts | cognitive-complexity | /function:nested": 21,
"src/complexity.ts | cognitive-complexity | /function:busy": 21
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ts-project/quality/ts-complexity-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "oxlint@1.82.0",
"configHash": "09cea93df07b517f2cc1af3418a1bcca1128f0b056897ba948a03afad4aa1609",
"configHash": "61d7745be542a70d4ba2343dd4ab86580e5b290f95f733782b2c43d0923fc861",
"findings": {
"src/cognitive.ts | eslint(max-depth) | /function:nested/if/block/if/block/if/block/if": 4,
"src/cognitive.ts | eslint(max-depth) | /function:nested/if/block/if/block/if/block/if/block/if": 5,
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ts-project/quality/ts-duplication-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "09cea93df07b517f2cc1af3418a1bcca1128f0b056897ba948a03afad4aa1609",
"configHash": "61d7745be542a70d4ba2343dd4ab86580e5b290f95f733782b2c43d0923fc861",
"findings": {
"52345a7776aa96cf": 1,
"f8c7fd6b65e1d3fa": 1
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ts-project/quality/ts-unused-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "knip@6.35.1",
"configHash": "09cea93df07b517f2cc1af3418a1bcca1128f0b056897ba948a03afad4aa1609",
"configHash": "61d7745be542a70d4ba2343dd4ab86580e5b290f95f733782b2c43d0923fc861",
"findings": {
"package.json | unused-dependency | left-pad": 1,
"src/cognitive.ts | unused-file | src/cognitive.ts": 1,
Expand Down
2 changes: 1 addition & 1 deletion fixtures/web-project/quality/web-duplication-baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"tool": "jscpd@5.2.0",
"configHash": "81a07efba6c46a7fab23adec58c898034dab35b276ff98d48bad64dba1395541",
"configHash": "ad04ca85d4d964bd41ea99e7d981446c102d2f57ea78cfa1f539f1db5a803c7c",
"findings": {
"49b1e091be111932": 1,
"bf23efa9a8a4e58b": 1
Expand Down
2 changes: 1 addition & 1 deletion launcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runroom/code-quality",
"version": "1.2.0",
"version": "1.3.0",
"description": "Runroom incremental quality gate — runs the pinned ghcr.io/runroom/code-quality image",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runroom/code-quality",
"version": "1.2.0",
"version": "1.3.0",
"private": true,
"type": "module",
"engines": { "node": ">=24" },
Expand Down
2 changes: 1 addition & 1 deletion quality/ts-architecture-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "depcruise@18.2.0",
"configHash": "5efc8f54a48ed2847d32f8e54797f7fbecb80d40283bfa6a5b922fd4503610db",
"configHash": "0df258234321ea227301beb0f76fddbf18654e73d4b97510dfa78cdea6be43d2",
"findings": {}
}
2 changes: 1 addition & 1 deletion quality/ts-cognitive-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "fallow@3.23.0",
"configHash": "5efc8f54a48ed2847d32f8e54797f7fbecb80d40283bfa6a5b922fd4503610db",
"configHash": "0df258234321ea227301beb0f76fddbf18654e73d4b97510dfa78cdea6be43d2",
"findings": {}
}
2 changes: 1 addition & 1 deletion quality/ts-complexity-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"tool": "oxlint@1.82.0",
"configHash": "5efc8f54a48ed2847d32f8e54797f7fbecb80d40283bfa6a5b922fd4503610db",
"configHash": "0df258234321ea227301beb0f76fddbf18654e73d4b97510dfa78cdea6be43d2",
"findings": {}
}
Loading
Loading