Skip to content

WIP: diffguard-types/lib.rs: Wrap doc identifiers in backticks#614

Draft
EffortlessSteven wants to merge 4 commits intomainfrom
feat/work-452a2701/doc-markdown-fix
Draft

WIP: diffguard-types/lib.rs: Wrap doc identifiers in backticks#614
EffortlessSteven wants to merge 4 commits intomainfrom
feat/work-452a2701/doc-markdown-fix

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

Closes #385

Summary

Fix clippy::doc_markdown warnings in diffguard-types/lib.rs by wrapping bare identifiers in doc comments with backticks at lines 398 and 402.

What Changed

  • crates/diffguard-types/src/lib.rs: Wrapped bare identifiers in doc comments at lines 398 and 402 in backticks to satisfy clippy::doc_markdown lint

Test Results (so far)

Clippy shows no warnings at lines 398 and 402 for doc_markdown.

Friction Encountered

  • Implementation was correct but tests checked wrong lines (issue description was wrong about line numbers)

Notes

  • Draft PR - not ready for review until GREEN tests confirmed

Work item: work-d4a75f70

This ADR documents the decision to update diffguard.toml.example to demonstrate
the tags and test_cases features, which already exist in the codebase but
are missing from the example file.

- Add tags = ["safety"] to rust.no_unwrap (consistent with built_in.json)
- Add [[rule.test_cases]] blocks with positive and negative test cases
- Keep additions minimal (~10 lines) per plan review recommendations
Work item: work-d4a75f70

- Add tags = ["safety"] to rust.no_unwrap (consistent with built_in.json)
- Add [[rule.test_cases]] blocks with positive and negative test cases
- Positive case: input with .unwrap() should_match = true
- Negative case: input with .ok() should_match = false

Closes #463
…eError

Doc writer: add missing docstrings to public types in diffguard-diff.

- ChangeKind: explain Added/Changed/Deleted semantics
- DiffLine: document path, line, content, kind fields
- DiffStats: document files and lines count fields
- DiffParseError: document MalformedHunkHeader and Overflow variants

All predicate functions already had #[must_use] and docstrings from
prior implementation work (issue #498, PR #511).
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 45 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 45 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c99224f-0172-46e6-915c-acae1adbb5c2

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1d9e1 and 189b7b0.

📒 Files selected for processing (16)
  • crates/diffguard-analytics/src/lib.rs
  • crates/diffguard-analytics/tests/edge_cases.rs
  • crates/diffguard-core/src/render.rs
  • crates/diffguard-core/tests/properties.rs
  • crates/diffguard-diff/src/unified.rs
  • crates/diffguard-domain/src/evaluate.rs
  • crates/diffguard-domain/tests/red_tests_work_9dbac498.rs
  • crates/diffguard-types/src/lib.rs
  • crates/diffguard-types/tests/doc_markdown_fix.rs
  • crates/diffguard-types/tests/green_edge_tests_work_2b446664.rs
  • crates/diffguard-types/tests/properties.rs
  • crates/diffguard-types/tests/red_tests_work_452a2701.rs
  • crates/diffguard/src/main.rs
  • crates/diffguard/tests/red_tests_work_d4a75f70.rs
  • diffguard.toml.example
  • fuzz/fuzz_targets/sarif_renderer.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/work-452a2701/doc-markdown-fix

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 and usage tips.

@EffortlessSteven
Copy link
Copy Markdown
Member Author

This PR has multiple independent changes bundled together that are better split:\n\n1. Missing import (compile error): diffguard-core/src/render.rs calls escape_md() but doesn't import it from diffguard_types. Fix: add use diffguard_types::escape_md;\n\n2. u32→u64 lines_scanned incomplete: CheckAnalytics::lines_scanned and Evaluation::lines_scanned need upgrading to u64. Already fixed in #609.\n\n3. Test failures from green_tests_work_d4a75f70.rs: The test file checks for documentation of tags/test_cases that only exists after #608 lands.\n\n4. TREND_HISTORY_SCHEMA_V2 missing: Tests reference a constant that doesn't exist.\n\n5. Private Mode enum accessed: Tests try to access diffguard_domain::preprocess::Mode which is private.\n\nRecommendation: Close this PR in favor of the more focused:\n- #608 (tags/test_cases in diffguard.toml.example)\n- #609 (escape_md move + lines_scanned type propagation)\n\nWould you like me to close this PR?

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.

diffguard-types/lib.rs:398,402: doc comments use bare identifiers — clippy::doc_markdown

1 participant