Skip to content

feat: add --ignore flag to suppress validate warning kinds - #20

Merged
Fcmam5 merged 3 commits into
mainfrom
feat/validate-ignore
Oct 7, 2026
Merged

Fcmam5 merged 3 commits into
mainfrom
feat/validate-ignore

Conversation

@Fcmam5

@Fcmam5 Fcmam5 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Bundles nested in a repo subdirectory (e.g. docs/) need relative links for IDE navigation, which tripped prefer-absolute-links on every file. --ignore is repeatable, rejects unknown/error kinds, and excluded warnings do not count under --strict. Library: validate(root, { ignore }) with exported WARNING_KINDS/WarningKind.

Summary by CodeRabbit

  • New Features
    • Added repeatable validate --ignore <kind> options to suppress selected warnings from output and strict-mode checks. Errors cannot be ignored, and unsupported kinds are rejected.
    • Added a library option for ignoring warning kinds, along with exported warning-kind constants and types.
  • Documentation
    • Updated validation guidance with supported warning kinds and ignore behavior.
    • Updated the security policy to support version 0.8.x; versions below 0.8 are unsupported.
  • Chores
    • Updated the package version to 0.8.0.

Bundles nested in a repo subdirectory (e.g. docs/) need relative links for IDE navigation, which tripped prefer-absolute-links on every file. --ignore <kind> is repeatable, rejects unknown/error kinds, and excluded warnings do not count under --strict. Library: validate(root, { ignore }) with exported WARNING_KINDS/WarningKind.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5380d957-5960-4050-bab0-812cefcf5e27

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f64e16a-94fe-4877-a96d-38567a081052
📥 Commits

Reviewing files that changed from the base of the PR and between f1ee75a and ef16529.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • README.md
  • SECURITY.md
  • bin/okph.ts
  • package.json
  • src/index.ts
  • src/validate.ts
  • test/cli.test.ts
  • test/validate.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The validation library and CLI now support repeatable suppression of selected warning kinds. Ignored warnings do not appear in validation results or counts. Errors cannot be ignored, and the package exports the warning-kind definitions and validation options.

Changes

Validation warning suppression

Layer / File(s) Summary
Validation options and filtering
src/validate.ts, src/index.ts, test/validate.test.ts
validate accepts an optional ignore list of supported warning kinds and filters ignored warnings from diagnostics and counts. The package exports WARNING_KINDS, ValidateOptions, and WarningKind. Tests check warning filtering and confirm that errors remain.
CLI ignore option
bin/okph.ts, test/cli.test.ts
The CLI accepts repeatable --ignore <kind> options for validate, rejects unknown kinds and use on other commands, and passes valid kinds to validate. Tests cover suppression, strict-mode results, and invalid input handling.
Version and usage documentation
package.json, CHANGELOG.md, README.md, SECURITY.md
The package version changes to 0.8.0. The changelog and README describe warning suppression, and the security policy updates its supported-version range.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant CLI as bin/okph.ts
  participant Validation as validate
  User->>CLI: Run validate with --ignore kind
  CLI->>Validation: Call validate with ignored kinds
  Validation-->>CLI: Return filtered diagnostics and counts
  CLI-->>User: Print validation result
Loading

Merge Risk: ⚪ Minimal · up to ef165

The warning-suppression change has no identified issue requiring resolution before merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a repeatable --ignore flag to suppress selected validate warning kinds.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files. (4 skipped: 4 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-v8@​5.0.0 ⏵ 5.0.3991007999 +1100
Updatedvitest@​5.0.0 ⏵ 5.0.39810079 +199100
Updatedmarked@​18.0.12 ⏵ 18.1.0100 +1100100 +19880
Updated@​types/​node@​26.5.0 ⏵ 26.6.4100 +110081 +196100
Updatedtsx@​4.23.13 ⏵ 4.23.15100 +11008193100
Updatedoxlint@​1.82.0 ⏵ 1.87.09910091 +195 -1100

View full report

@Fcmam5
Fcmam5 merged commit 2476c83 into main Oct 7, 2026
7 checks passed
@Fcmam5
Fcmam5 deleted the feat/validate-ignore branch October 7, 2026 22:29
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.

1 participant