Skip to content

Conversation

@hippietrail
Copy link
Collaborator

@hippietrail hippietrail commented Nov 25, 2025

Issues

N/A

Description

I've been thinking of a tool to make sure all the linter lines in linting/mod.rs and linting/lint_group.rs are

  • in alphabetical order
  • not dupes
  • use struct vs expr correctly
  • etc.

This is a start on that. It's already helped me spot things that look wrong.

For instance:

mod bought;
mod call_them;
mod cant;

In linting/mod.rs. And in linting/lint_group.rs:

use super::bought::Bought;
use super::cant::Cant;

and:

        insert_expr_rule!(Bought, true);
        insert_expr_rule!(Cant, true);

No other mentions of call_them or CallThem!

Is it an experiment that got staged by accident with some other linter's PR? Or were the missing lines in those two files an unnoticed mistake? Note that these are kinds of errors that the Rust compiler and the unit tests do not pick up!

I actually thought there was another linter that overlapped with this CallThem that handled other pronoun or NP cases, but maybe that's one of my unfinished experiment? (-:

Note that I'm not sure the best way to check insert_struct_rule vs insert_expr_rule yet but when I started manually checking through the list I think I stopped after seeing at least four that were wrong.

Any idea or other feedback appreciated!

Demo

Screenshot 2025-11-29 at 11 53 35 pm image

How Has This Been Tested?

Manually

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@hippietrail hippietrail added enhancement New feature or request help wanted Extra attention is needed harper-cli harper-core linting labels Nov 25, 2025
@hippietrail hippietrail removed the help wanted Extra attention is needed label Nov 26, 2025
@hippietrail hippietrail marked this pull request as ready for review November 26, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant