Skip to content

ci(lint): ignore all generated CHANGELOGs in markdownlint - #662

Merged
patextreme merged 1 commit into
mainfrom
ci/fix-markdownlint-changelog-ignore
Jun 23, 2026
Merged

ci(lint): ignore all generated CHANGELOGs in markdownlint#662
patextreme merged 1 commit into
mainfrom
ci/fix-markdownlint-changelog-ignore

Conversation

@patextreme

Copy link
Copy Markdown
Contributor

Problem

The File Hygiene workflow (lint / Markdown job) has been failing on every PR since the last nx release, e.g. on Dependabot PR #661:

All 7 failures are MD047/single-trailing-newline on per-package CHANGELOGs:

packages/lib/protos/CHANGELOG.md
packages/lib/sdk/CHANGELOG.md
packages/shared/domain/CHANGELOG.md
packages/wasm/anoncreds/CHANGELOG.md
packages/wasm/config/CHANGELOG.md
packages/wasm/didcomm/CHANGELOG.md
packages/wasm/jwe/CHANGELOG.md

Root cause

file-hygiene.yml calls the shared reusable workflow hyperledger-identus/.github/.github/workflows/lint-files.yml, which runs markdownlint-cli2-action over **/*.md.

The repo's .markdownlint-cli2.yaml ignored only the root CHANGELOG.md:

ignores:
  - "CHANGELOG.md"

The per-package packages/**/CHANGELOG.md files are auto-generated by nx release (commit chore(release): [skip ci]) and are written without a trailing newline. Because they were not ignored, they were linted and failed MD047. After each release rewrites them, every subsequent PR fails the lint job.

Fix

Change the ignore from "CHANGELOG.md" to "**/CHANGELOG.md" so all generated changelogs (root + per-package) are exempt — consistent with how the root changelog was already handled. Generated content should not be hand-linted.

 ignores:
   - ".claude/**"
   - "node_modules/**"
   - "**/node_modules/**"
   - "coverage/**"
   - "externals/**"
   - "docs/sdk/**"
-  - "CHANGELOG.md"
+  - "**/CHANGELOG.md"

Verification

  • Locally: markdownlint-cli2 '**/*.md'Summary: 0 error(s) (44 files linted, down from 51; the 7 CHANGELOGs are now excluded).
  • CI: pending on this PR.

This is a permanent fix: future nx release runs can regenerate the per-package CHANGELOGs without a trailing newline and the lint job will stay green.

@patextreme
patextreme requested a review from a team as a code owner June 23, 2026 02:09
@patextreme
patextreme force-pushed the ci/fix-markdownlint-changelog-ignore branch 2 times, most recently from 92a46d0 to cce5a9b Compare June 23, 2026 02:13
@patextreme
patextreme enabled auto-merge June 23, 2026 02:16
@patextreme
patextreme disabled auto-merge June 23, 2026 06:54
The File Hygiene workflow (reusable lint-files.yml from
hyperledger-identus/.github) runs markdownlint-cli2 over **/*.md.
The repo config (.markdownlint-cli2.yaml) ignored only the root
CHANGELOG.md, but per-package CHANGELOGs (packages/**/CHANGELOG.md)
are auto-generated by `nx release` and written without a trailing
newline, violating MD047/single-trailing-newline.

This made the lint / Markdown job fail on every PR after each release
that rewrote the per-package changelogs (e.g. Dependabot PR #661).

Fix: change the ignore from "CHANGELOG.md" to "**/CHANGELOG.md" so all
generated changelogs (root + per-package) are exempt, consistent with
how the root changelog was already handled.

Verified locally: markdownlint-cli2 '**/*.md' -> 0 error(s).

Signed-off-by: Pat Losoponkul <patextreme@hotmail.com>
@patextreme
patextreme force-pushed the ci/fix-markdownlint-changelog-ignore branch from cce5a9b to d6948c6 Compare June 23, 2026 08:13
@patextreme
patextreme enabled auto-merge June 23, 2026 08:13
@patextreme
patextreme added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit ed4c7c9 Jun 23, 2026
8 checks passed
@patextreme
patextreme deleted the ci/fix-markdownlint-changelog-ignore branch June 23, 2026 08:27
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants