comply-human-warn-onlychanged
Asserts — Warn and info findings are reported but do not fail the build — verdict wording plus exit 0.
Ran hermex comply --config configs/warn-only.config.ts in fixtures/ → exit 0, as asserted
Config fixtures/configs/warn-only.config.ts · Fixture fixtures (overview) · Case comply-human-warn-only (dossier)
Reproduce locally: pnpm run test:output -- --filter comply-human-warn-only
fixtures/configs/warn-only.config.ts
import type { HermexConfigInput } from '../../src/config/types.ts';
import base from '../hermex.config.ts';
/**
* The same rules as the primary config, none of them at `error`. Nothing
* here can fail a build, so `comply` must exit 0 while still printing every
* finding — and the verdict has to say "compliant" without pretending the
* repo is clean. That wording is the whole point of the case.
*/
export default {
...base,
rules: {
'no-files': [
{
severity: 'warn',
patterns: ['jest.config.*', '.babelrc'],
message: 'Use vitest + Vite',
},
],
'no-packages': [
{ severity: 'warn', patterns: ['moment'], message: 'Use date-fns or dayjs' },
],
'require-files': [
{ severity: 'warn', patterns: ['.nvmrc'] },
{ severity: 'info', patterns: ['.editorconfig'] },
],
'require-packages': [
{
severity: 'info',
patterns: ['typescript'],
message: 'TypeScript is required',
},
],
'require-scripts': [
{
severity: 'warn',
patterns: ['build', 'test'],
message: 'Required npm scripts',
},
],
'require-package-fields': [{ severity: 'warn', patterns: ['engines', 'license'] }],
'require-engine-version': { severity: 'info', range: '>=20', message: 'Minimum Node 20 required' },
},
} satisfies HermexConfigInput;
Diffs are unified format: - is the target branch, + is this run. @@ -12,7 +12,9 @@ is a hunk header — unchanged lines were skipped, and the hunk below covers 7 lines from line 12 of the target branch and 9 lines from line 12 of this run.
--- target/stdout.txt
+++ current/stdout.txt
@@ -17,6 +17,22 @@
Syntax Error
+🔍 Rules
+
+┌──────────────────┬──────────────────────────────────────────────────────┐
+│ Rule │ Description │
+├──────────────────┼──────────────────────────────────────────────────────┤
+│ no-packages │ 🟡 moment is forbidden — Use date-fns or dayjs │
+├──────────────────┼──────────────────────────────────────────────────────┤
+│ require-packages │ 🔵 typescript not installed — TypeScript is required │
+├──────────────────┼──────────────────────────────────────────────────────┤
+│ require-files │ 🟡 .nvmrc not found │
+├──────────────────┼──────────────────────────────────────────────────────┤
+│ require-files │ 🔵 .editorconfig not found │
+└──────────────────┴──────────────────────────────────────────────────────┘
+
+2 warnings
+
⚖️ Versus
Design System Migration
stdout.txthermex v<version>
- Parsing lockfile...
✔ Found pnpm lockfile (supports: v5, v6, v9) - 5 packages
✔ Found 18 files
✔ Analysis complete! Analyzed 17/18 files
⚠ 1 file(s) failed to parse:
broken/unparseable.tsx
x Expression expected
,----
1 | export const Broken = ( : : :;
: ^
`----
Caused by:
Syntax Error
🔍 Rules
┌──────────────────┬──────────────────────────────────────────────────────┐
│ Rule │ Description │
├──────────────────┼──────────────────────────────────────────────────────┤
│ no-packages │ 🟡 moment is forbidden — Use date-fns or dayjs │
├──────────────────┼──────────────────────────────────────────────────────┤
│ require-packages │ 🔵 typescript not installed — TypeScript is required │
├──────────────────┼──────────────────────────────────────────────────────┤
│ require-files │ 🟡 .nvmrc not found │
├──────────────────┼──────────────────────────────────────────────────────┤
│ require-files │ 🔵 .editorconfig not found │
└──────────────────┴──────────────────────────────────────────────────────┘
2 warnings
⚖️ Versus
Design System Migration
──────────────────────────────────────────────────
@design-system/foundation ██████████████████████████████ 100.0% (33 usages)
@new-system/arc ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.0% (0 usages)
🟢 COMPLIANT
stderr.txt