Skip to content

docs: Add dylints guide#80

Open
maurolacy wants to merge 5 commits into
constructorfabric:mainfrom
maurolacy:docs/add-dylints
Open

docs: Add dylints guide#80
maurolacy wants to merge 5 commits into
constructorfabric:mainfrom
maurolacy:docs/add-dylints

Conversation

@maurolacy

@maurolacy maurolacy commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Add a small guide for adding / contributing new dylints.

Resolves / addresses constructorfabric/gears-rust#4183 (comment).

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for creating and integrating new lint rules, including implementation overview, documentation placement, and UI test setup.
    • Expanded the workflow to cover how to run/update tests locally and validate the lint against a target workspace.
    • Added adoption steps and a checklist to help publish and enable the new lint consistently.
    • Updated the project structure to reflect the new per-lint documentation location.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@maurolacy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 376a2de1-f7fa-46ed-a20f-d9428258b604

📥 Commits

Reviewing files that changed from the base of the PR and between 310f745 and f503e8d.

📒 Files selected for processing (46)
  • crates/cargo-gears-lints/README.md
  • crates/cargo-gears-lints/docs/README.md
  • crates/cargo-gears-lints/src/de01_domain_layer/de0101_no_serde_in_domain.rs
  • crates/cargo-gears-lints/src/de01_domain_layer/de0101_no_serde_in_domain/README.md
  • crates/cargo-gears-lints/src/de01_domain_layer/de0102_no_toschema_in_domain.rs
  • crates/cargo-gears-lints/src/de01_domain_layer/de0102_no_toschema_in_domain/README.md
  • crates/cargo-gears-lints/src/de01_domain_layer/de0104_no_api_dto_in_domain.rs
  • crates/cargo-gears-lints/src/de01_domain_layer/de0104_no_api_dto_in_domain/README.md
  • crates/cargo-gears-lints/src/de02_api_layer/de0201_dtos_only_in_api_rest.rs
  • crates/cargo-gears-lints/src/de02_api_layer/de0201_dtos_only_in_api_rest/README.md
  • crates/cargo-gears-lints/src/de02_api_layer/de0202_dtos_not_referenced_outside_api.rs
  • crates/cargo-gears-lints/src/de02_api_layer/de0202_dtos_not_referenced_outside_api/README.md
  • crates/cargo-gears-lints/src/de02_api_layer/de0203_dtos_must_use_api_dto.rs
  • crates/cargo-gears-lints/src/de02_api_layer/de0203_dtos_must_use_api_dto/README.md
  • crates/cargo-gears-lints/src/de02_api_layer/de0204_dtos_must_have_toschema_derive.rs
  • crates/cargo-gears-lints/src/de02_api_layer/de0204_dtos_must_have_toschema_derive/README.md
  • crates/cargo-gears-lints/src/de03_domain_layer/de0301_no_infra_in_domain.rs
  • crates/cargo-gears-lints/src/de03_domain_layer/de0301_no_infra_in_domain/README.md
  • crates/cargo-gears-lints/src/de03_domain_layer/de0308_no_http_in_domain.rs
  • crates/cargo-gears-lints/src/de03_domain_layer/de0308_no_http_in_domain/README.md
  • crates/cargo-gears-lints/src/de05_client_layer/de0503_plugin_client_suffix.rs
  • crates/cargo-gears-lints/src/de05_client_layer/de0503_plugin_client_suffix/README.md
  • crates/cargo-gears-lints/src/de07_security/de0706_no_direct_sqlx.rs
  • crates/cargo-gears-lints/src/de07_security/de0706_no_direct_sqlx/README.md
  • crates/cargo-gears-lints/src/de07_security/de0707_drop_zeroize.rs
  • crates/cargo-gears-lints/src/de07_security/de0707_drop_zeroize/README.md
  • crates/cargo-gears-lints/src/de07_security/de0708_no_non_fips_hasher.rs
  • crates/cargo-gears-lints/src/de07_security/de0708_no_non_fips_hasher/README.md
  • crates/cargo-gears-lints/src/de08_rest_api_conventions/de0801_api_endpoint_version.rs
  • crates/cargo-gears-lints/src/de08_rest_api_conventions/de0801_api_endpoint_version/README.md
  • crates/cargo-gears-lints/src/de08_rest_api_conventions/de0803_api_snake_case.rs
  • crates/cargo-gears-lints/src/de08_rest_api_conventions/de0803_api_snake_case/README.md
  • crates/cargo-gears-lints/src/de09_gts_layer/de0901_gts_string_pattern.rs
  • crates/cargo-gears-lints/src/de09_gts_layer/de0901_gts_string_pattern/README.md
  • crates/cargo-gears-lints/src/de09_gts_layer/de0902_no_schema_for_on_gts_structs.rs
  • crates/cargo-gears-lints/src/de09_gts_layer/de0902_no_schema_for_on_gts_structs/README.md
  • crates/cargo-gears-lints/src/de11_testing/de1101_tests_in_separate_files.rs
  • crates/cargo-gears-lints/src/de11_testing/de1101_tests_in_separate_files/README.md
  • crates/cargo-gears-lints/src/de12_documentation/de1201_docs_rs_all_features.rs
  • crates/cargo-gears-lints/src/de12_documentation/de1201_docs_rs_all_features/README.md
  • crates/cargo-gears-lints/src/de13_common_patterns/de1301_no_print_macros.rs
  • crates/cargo-gears-lints/src/de13_common_patterns/de1301_no_print_macros/README.md
  • crates/cargo-gears-lints/src/de13_common_patterns/de1302_error_from_to_string.rs
  • crates/cargo-gears-lints/src/de13_common_patterns/de1302_error_from_to_string/README.md
  • crates/cargo-gears-lints/src/de13_common_patterns/de1303_no_primitive_type_alias.rs
  • crates/cargo-gears-lints/src/de13_common_patterns/de1303_no_primitive_type_alias/README.md
📝 Walkthrough

Walkthrough

The cargo-gears-lints README documents the workflow for selecting, implementing, registering, documenting, testing, publishing, and adopting a new Dylint lint rule.

Changes

Lint Rule Authoring Guide

Layer / File(s) Summary
Lint implementation and registration
crates/cargo-gears-lints/README.md
Documents rule ID and category selection, lint implementation skeletons, pass types, and registration in src/lib.rs.
Documentation, testing, and adoption
crates/cargo-gears-lints/README.md
Updates the project structure and documents per-lint documentation, UI fixtures, .stderr updates, Cargo example registration, local and workspace testing, publishing, and adoption checklist steps.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 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 accurately summarizes the doc-focused addition of a guide for adding new dylints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Signed-off-by: Mauro Lacy <11656534+maurolacy@users.noreply.github.com>
Comment thread crates/cargo-gears-lints/README.md Outdated
Comment thread crates/cargo-gears-lints/README.md Outdated
Signed-off-by: Mauro Lacy <11656534+maurolacy@users.noreply.github.com>
Signed-off-by: Mauro Lacy <11656534+maurolacy@users.noreply.github.com>
@maurolacy

Copy link
Copy Markdown
Contributor Author

@aviator5, addressed your comments.

Please review and merge maurolacy#1 as well before merging this one upstream.

Signed-off-by: Mauro Lacy <11656534+maurolacy@users.noreply.github.com>
@aviator5

Copy link
Copy Markdown

@aviator5, addressed your comments.

Please review and merge maurolacy#1 as well before merging this one upstream.

Sorry, but maurolacy#1 is a PR to your repo..

@maurolacy

Copy link
Copy Markdown
Contributor Author

Sorry, but maurolacy#1 is a PR to your repo..

Yes, but it'll compose / merge on top of this branch.

@maurolacy

Copy link
Copy Markdown
Contributor Author

It's just not to clutter stuff in here.

@maurolacy

Copy link
Copy Markdown
Contributor Author

In any case, I can review / merge it myself after you finish reviewing stuff here.

@aviator5

Copy link
Copy Markdown

I've approved both PRs

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.

3 participants