diff --git a/.codacy.yml b/.codacy.yml index db352ee..dda7592 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -1,16 +1,12 @@ --- -# Codacy configuration. -# -# TSLint is deprecated and is switched off for this repository in Codacy, yet -# Codacy still ran it. It is turned off from here in two ways: tslint.json -# enables no rule, and the paths below keep every file away from the tool. -# The two JSON files are named as well, because they are what it flagged: it -# asked for trailing commas and sorted keys, which JSON and npm's lock file -# cannot have. Every other tool still reads every file. +# Codacy configuration + engines: - tslint: + # Lizard reads the lock files as source code and reports their length. + # Composer and npm generate them; nobody writes them by hand. + lizard: exclude_paths: - - "**" - - "**/*" - - "package.json" + - "composer.lock" - "package-lock.json" + - "**/composer.lock" + - "**/package-lock.json" diff --git a/.github/scripts/check-plugin-package.py b/.github/scripts/check-plugin-package.py index 99836dc..30bf135 100755 --- a/.github/scripts/check-plugin-package.py +++ b/.github/scripts/check-plugin-package.py @@ -66,10 +66,8 @@ def tracked_files(root: Path, *options: str) -> set[str]: def check_distignore(root: Path, tracked: set[str], names: set[str]) -> None: - """Require .distignore to keep exactly the tracked files that the allowlist ships. - - Git matches the patterns, so they mean what they mean to `wp dist-archive`. - """ + """Require .distignore to keep exactly the tracked files that the allowlist ships.""" + # Git matches the patterns, so they mean what they mean to `wp dist-archive`. distignore = root / ".distignore" if distignore.is_symlink() or not distignore.is_file(): raise ValueError("The .distignore file is missing.") diff --git a/.github/scripts/test-automation.py b/.github/scripts/test-automation.py index 5644c2e..4684cd3 100755 --- a/.github/scripts/test-automation.py +++ b/.github/scripts/test-automation.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 -"""Standard-library regression fixtures, executed by GitHub's package-check job. +"""Standard-library regression fixtures, executed by GitHub's package-check job.""" -These fixtures do not bootstrap WordPress or replace workflow-generated PHP tests. -All mutation is confined to a temporary fixture repository on the runner. -""" +# These fixtures do not bootstrap WordPress or replace workflow-generated PHP tests. +# All mutation is confined to a temporary fixture repository on the runner. from __future__ import annotations