Skip to content

Conversation

ethqnol
Copy link
Contributor

@ethqnol ethqnol commented Sep 9, 2025

Description

  • Added a spell check rule that ignores all caps words when enabled (targeted to let spell check ignore acronyms/abbreviations)
  • Implemented as a modifier linter SpellCheckIgnoreAllCaps that configures existing SpellCheck behavior
  • Supports ALL CAPS words with common suffixes: 's, 'd, ed, s, es (e.g., APIs, CPUs, API'd, GPSes)
  • Uses existing config structure (users toggle via "SpellCheckIgnoreAllCaps": true in their config)

How Has This Been Tested?

  • Unit tests have been added
  • Integration tests added

Checklist

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

@elijah-potter
Copy link
Collaborator

What is the consensus? Should this be enabled by default?

@ethqnol
Copy link
Contributor Author

ethqnol commented Sep 11, 2025

What is the consensus? Should this be enabled by default?

I can see an argument for both. I'd maybe say disabled by default? That way it doesn't interfere with people's current Harper configs.

@ethqnol
Copy link
Contributor Author

ethqnol commented Sep 12, 2025

What is the consensus? Should this be enabled by default?

I can see an argument for both. I'd maybe say disabled by default? That way it doesn't interfere with people's current Harper configs.

@elijah-potter what do you think?

fn lint(&mut self, document: &Document) -> Vec<Lint> {
let mut results = Vec::new();

// Check for spell check flags before running linters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another case where we're adding specialized logic to the LintGroup, which should be general. Could we set it by passing a boolean into the LintGroup::curated() method call? We could then expose config to the user as an actual checkbox (or similar).

I apologize for the back-and-forth. Thanks for responding to feedback so quickly!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for your response! I'll see if I can implement that. Do note that I have not looked into the frontend settings config code; is there a checkbox (or similar) feature in that pipeline already?

Anyways I'll take a look and get back to you ASAP. I've got some important tests this week so it might be a bit delayed.

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