@sinemacula/coding-standards 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Latest Stable Version](https://img.shields.io/packagist/v/sinemacula/coding-standards.svg)](https://packagist.org/packages/sinemacula/coding-standards)
4
4
  [![npm Version](https://img.shields.io/npm/v/@sinemacula/coding-standards.svg)](https://www.npmjs.com/package/@sinemacula/coding-standards)
5
+ [![Build Status](https://github.com/sinemacula/coding-standards/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/sinemacula/coding-standards/actions/workflows/tests.yml)
6
+ [![Quality Gates](https://github.com/sinemacula/coding-standards/actions/workflows/quality-gates.yml/badge.svg?branch=master)](https://github.com/sinemacula/coding-standards/actions/workflows/quality-gates.yml)
5
7
  [![Maintainability](https://qlty.sh/gh/sinemacula/projects/coding-standards/maintainability.svg)](https://qlty.sh/gh/sinemacula/projects/coding-standards)
6
8
  [![Code Coverage](https://qlty.sh/gh/sinemacula/projects/coding-standards/coverage.svg)](https://qlty.sh/gh/sinemacula/projects/coding-standards)
7
9
  [![Total Downloads](https://img.shields.io/packagist/dt/sinemacula/coding-standards.svg)](https://packagist.org/packages/sinemacula/coding-standards)
@@ -335,7 +337,8 @@ one line where present; a free function keeps the freedom of either shape.
335
337
  `comment-line-wrap` takes `maxLength` (default 80) and is the syntax-only counterpart of the PHP
336
338
  `SineMacula.Commenting.CommentLineLength` sniff. It fills standalone `//` runs and multi-line docblock prose greedily,
337
339
  reporting an overflowing line and a prematurely wrapped line on their own footings and autofixing both. Markdown
338
- headings, docblock tag lines, suppression directives, fenced code, an indented code or command block, a doc-tag whose
340
+ headings, docblock tag lines, machine-parsed tool directives (`eslint`, `biome-ignore`, `@ts-`, `Stryker`, `c8`/`v8`/
341
+ `istanbul ignore`, `@vite-ignore` and the like), fenced code, an indented code or command block, a doc-tag whose
339
342
  value opens a multi-line bracketed type (an `array{...}` shape, a `<...>` generic or a `\Closure(...)` signature),
340
343
  tables, separators, a line whose overflow is a single unbreakable token such as a long name or URL, trailing comments
341
344
  after code and compact single-line docblocks are left untouched.
@@ -356,12 +359,14 @@ single-line blocks included. The type-checked layer adds `@typescript-eslint/exp
356
359
  ## Testing
357
360
 
358
361
  ```bash
359
- composer test # PHPUnit suite for the custom sniffs and PHPStan rule
360
- composer test:coverage # suite with Clover coverage output
361
- composer analyse # PHPStan static analysis
362
- composer check # static analysis and lint via qlty
363
- composer format # format via qlty
364
- composer smells # duplication / complexity smells via qlty
362
+ composer test # PHPUnit suite for the custom sniffs and PHPStan rule
363
+ composer test:coverage # suite with Clover coverage output
364
+ composer test:mutation # Infection mutation gate (min MSI 90)
365
+ composer test:mutation:full # full mutation suite without thresholds
366
+ composer analyse # PHPStan static analysis
367
+ composer check # static analysis and lint via qlty
368
+ composer format # format via qlty
369
+ composer smells # duplication / complexity smells via qlty
365
370
  ```
366
371
 
367
372
  ## Changelog
@@ -18,7 +18,7 @@ const FENCE = /^(```|~~~)/;
18
18
  const TAG = new RegExp(`^@[A-Za-z][A-Za-z0-9-]*(?=${WS}|$)`);
19
19
  const LIST = new RegExp(`^${WS}*([-*+]|\\d+[.)])${WS}+`);
20
20
  const HEADING = new RegExp(`^#{1,6}${WS}`);
21
- const DIRECTIVE = /^(phpcs:|phpstan-ignore|@phpstan-|@psalm-|@phan-|eslint-disable|eslint-enable|@ts-|prettier-ignore|stylelint-|@codingStandards|@SuppressWarnings|NOSONAR|qlty-ignore)/;
21
+ const DIRECTIVE = /^(phpcs:|phpstan-ignore|@phpstan-|@psalm-|@phan-|eslint\b|globals?\b|exported\b|biome-ignore\b|@ts-|prettier-ignore|stylelint-|Stryker (?:disable|restore)\b|(?:c8|v8|istanbul) ignore\b|@vite-ignore\b|webpackChunkName\b|@preserve\b|@license\b|@codingStandards|@SuppressWarnings|NOSONAR|qlty-ignore)/;
22
22
  const SEPARATOR = /^[=\-~*_#.+ ]{3,}$/;
23
23
  const CODE = new RegExp(`=>|->|::|;${WS}*$|\\{${WS}*$|^\\}|^(?:if|elseif|for|foreach|while|switch|catch)${WS}*\\(|^[\\w$>[\\]'.-]+${WS}*=[^=>]|^\\$`);
24
24
  const SPAN = /`[^`]*`|\{@[^}]*\}|\[[^\]]*\]\([^)]*\)/g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinemacula/coding-standards",
3
- "version": "1.16.0",
3
+ "version": "1.18.0",
4
4
  "description": "Centralized coding standards, static analysis configurations, and code quality tooling for all Sine Macula repositories.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Ben Carey <bdmc@sinemacula.co.uk>",