Skip to content

feat: add Rust Dylint rules#9

Merged
jan-kubica merged 2 commits into
mainfrom
feat/rust-lints
Jun 27, 2026
Merged

feat: add Rust Dylint rules#9
jan-kubica merged 2 commits into
mainfrom
feat/rust-lints

Conversation

@jan-kubica

Copy link
Copy Markdown
Contributor

Summary

  • add a Dylint library for shared Rust house rules
  • add the initial stella_lowercase lint for Rust string literals
  • document Dylint adoption and add CI coverage for the lint crate

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces custom Rust lints for stella repositories using Dylint, specifically implementing the stella_lowercase lint to enforce lowercase project naming in string literals. It also updates the project's documentation, configuration templates, and package scripts to integrate Dylint into the standard tooling workflow. Feedback on the implementation highlights a potential false positive where the substring check on 'Stella' would incorrectly flag words like 'Stellar', suggesting a refinement to check for word boundaries and adding a corresponding test case.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread rust-lints/stella_lints/src/lib.rs Outdated
Comment thread rust-lints/stella_lints/ui/main.rs
@jan-kubica jan-kubica marked this pull request as ready for review June 26, 2026 23:45

@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: 8b76dd794c

ℹ️ 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 rust/cargo-config.toml Outdated
@jan-kubica jan-kubica merged commit fe7012b into main Jun 27, 2026
3 checks passed
@jan-kubica jan-kubica deleted the feat/rust-lints branch June 27, 2026 00:20

@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: 677a2bdb8d

ℹ️ 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 rust-lints/README.md

```bash
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo dylint --workspace --all

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 Deny warnings in the consumer Dylint snippet

Fresh evidence: the alias and top-level README now forward -D warnings, but this remaining setup command still runs only cargo dylint --workspace --all. Because stella_lowercase is registered at Warn, consumers following this README get a successful run even when violations are printed; the upstream Dylint README describes --all as loading discovered libraries, with cargo/rustc flags passed after -- (source). Please keep this snippet aligned with the enforced command in rust/README.md.

Useful? React with 👍 / 👎.

}

fn is_word_boundary(value: char) -> bool {
!value.is_alphanumeric() && value != '_'

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 Preserve code-like Stella identifiers

For Rust repositories that need to mention product identifiers or paths, this predicate treats punctuation such as ., -, and / as word boundaries, so literals like Stella.app, Stella-macos-universal.dmg, or /Applications/Stella.app/... are reported and then fail under the recommended -D warnings command. The existing oxlint rule that this Rust rule is documented as mirroring keeps those code-like cases allowed in packages/oxlint-config/fixtures/stella-lowercase.fixture.tsx; mirror that skip logic here so required app and bundle names do not break consumer builds.

Useful? React with 👍 / 👎.

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