Skip to content

ci: add file hygiene workflow and resolve all lint errors - #260

Closed
yshyn-iohk wants to merge 4 commits into
mainfrom
ci/file-hygiene
Closed

ci: add file hygiene workflow and resolve all lint errors#260
yshyn-iohk wants to merge 4 commits into
mainfrom
ci/file-hygiene

Conversation

@yshyn-iohk

Copy link
Copy Markdown
Contributor

Summary

Implements file hygiene linting for docs as part of the org-wide rollout (hyperledger-identus/hyperledger-identus#172).

1. CI workflow and lint configuration

  • Add file-hygiene.yml caller workflow for the reusable lint-files.yml
  • Add canonical .editorconfig, .gitattributes, .markdownlint.yml, .markdownlint-cli2.yaml, .yamllint.yml
  • Excludes: cloud-agent/, sdk-ts/ (submodules), CHANGELOG.md, megalinter-reports/, .releaserc.yml

2. Lint fixes across the repo (67 files)

  • Markdownlint auto-fix: trailing spaces, blank lines around headings/lists/fences, multiple blank lines, missing final newline
  • Manual fix: extra table column in specifications.md (MD056)
  • CRLF to LF: CONTRIBUTING.md, DCO.md, LICENSE, MAINTAINERS.md, SECURITY.md
  • EditorConfig: add final newline to 20 files, fix trailing whitespace, fix indentation in src/utils/index.ts
  • YAML: trailing spaces and missing newline in link-check.yml

3. .git-blame-ignore-revs

  • Add mass formatting commit to blame ignore list

Test plan

  • File Hygiene (editorconfig) — passing (0 errors locally)
  • Markdown — passing (0 errors locally)
  • YAML — passing (0 errors locally)
  • ShellCheck — passing (no shell script issues)

Refs: hyperledger-identus/hyperledger-identus#172

🤖 Generated with Claude Code

@yshyn-iohk
yshyn-iohk requested a review from a team as a code owner May 21, 2026 18:40
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa76d95496

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .git-blame-ignore-revs Outdated
@@ -0,0 +1,3 @@
# style: auto-fix and manually resolve all lint errors across the repo
# Mass formatting. No logic changes.
4b7db591a3b641231533fe71f79459326fcd3ceb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point blame-ignore entry at the in-branch formatting commit

The new .git-blame-ignore-revs entry references 4b7db59..., but this commit is not in the ancestry of d1897e8 (the commit that actually introduces the mass formatting in this branch). In a clone that only has this branch history, git blame --ignore-revs-file will not suppress this formatting-only change, so blame attribution remains noisy. Update the file to include the formatting commit hash that exists in this branch history.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f130503a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .git-blame-ignore-revs Outdated
@@ -0,0 +1,3 @@
# style: auto-fix and manually resolve all lint errors across the repo
# Mass formatting. No logic changes.
925e3bea4df5627f8a2531149ba27af05f0321d8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use an in-branch formatting commit in blame-ignore

The .git-blame-ignore-revs entry points to 925e3bea4df5627f8a2531149ba27af05f0321d8, but that commit is not an ancestor of a63287e044eeb15c73fac2e34d98d841675e1a0a; in branch-only clones, git blame --ignore-revs-file will not suppress this mass-formatting change and blame remains noisy. Fresh evidence in the current revision: the hash was changed from the previously discussed value, but git merge-base --is-ancestor 925e3bea4df5627f8a2531149ba27af05f0321d8 a63287e044eeb15c73fac2e34d98d841675e1a0a still fails.

Useful? React with 👍 / 👎.

patextreme
patextreme previously approved these changes May 22, 2026
yshyn-iohk and others added 3 commits May 22, 2026 15:38
Add reusable file-hygiene workflow caller and canonical lint configs:

- .github/workflows/file-hygiene.yml: caller for lint-files.yml
- .editorconfig: UTF-8 (no BOM), LF line endings, indent rules
- .gitattributes: LF normalization for text files, binary rules
- .markdownlint.yml + .markdownlint-cli2.yaml: markdown lint rules
  with excludes for cloud-agent/, sdk-ts/, CHANGELOG.md, megalinter-reports/
- .yamllint.yml: YAML lint rules with .releaserc.yml excluded

Refs: hyperledger-identus/hyperledger-identus#172

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
Markdownlint auto-fix resolved formatting issues:
- MD009: trailing spaces
- MD012: multiple consecutive blank lines
- MD022: missing blank lines around headings
- MD031: missing blank lines around fenced code blocks
- MD032: missing blank lines around lists
- MD047: missing final newline

Manual fixes:
- MD056: fix extra table column in specifications.md

EditorConfig fixes:
- CRLF to LF normalization: CONTRIBUTING.md, DCO.md, LICENSE,
  MAINTAINERS.md, SECURITY.md
- Add final newline to 20+ files (TS, JS, CSS, JSON, MD, SH)
- Fix trailing whitespace in src/utils/index.ts, link-check.yml
- Fix indentation in src/utils/index.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a15a6b10d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .git-blame-ignore-revs
@@ -0,0 +1,3 @@
# style: auto-fix and manually resolve all lint errors across the repo
# Mass formatting. No logic changes.
c9e982cdf2de93a3093f2e9c3dc4653811de1eac

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point blame-ignore to the actual formatting commit

The .git-blame-ignore-revs entry does not reference a commit in the ancestry of this formatting change (git merge-base --is-ancestor c9e982cdf2de93a3093f2e9c3dc4653811de1eac 4b41a949659e485a18c5e051efc5ee46906d7435 fails), so git blame --ignore-revs-file will not suppress the mass reformat introduced here. Fresh evidence in this revision is that the newly added hash is c9e982…, but it still does not match the commit being introduced, leaving blame output noisy for these files.

Useful? React with 👍 / 👎.

@sonarqubecloud

Copy link
Copy Markdown

@yshyn-iohk

Copy link
Copy Markdown
Contributor Author

Commits pushed directly to main to preserve 3-commit structure and correct .git-blame-ignore-revs SHA.

Commits on main:

  • 987af652e ci: add file hygiene workflow and lint configuration
  • 8c39be112 style: auto-fix and manually resolve all lint errors across the repo
  • bcc4773db chore: add formatting commit to .git-blame-ignore-revs

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