Automattic / Automattic/harper

Feature request: add user-configurable regex Masker

Open
#948 5 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

Sections can be ignored by block and in-line quotes ('`', '```'), but this requires modifying comments which otherwise wouldn't quoting. It would be quite powerful to allow users to provide regex which allows them to describe patterns which should be ignored by default.

Consider the following examples:

Sometimes shell commands are useful in code comments, for example:
```bash
# Install dependencies with the following command
# $ some_command.sh
```

Similarly editor commands might have another common syntax:

```lua
-- View active clients with the following command
-- :lua print(vim.inspect(vim.lsp.get_active_clients()))
```

or
```vimscript
" Set color with the following command
" :colo darkblue
```

A user might want to use a regex such as `[\:\$].*$` to ignore comment content which is known to match one of these conventions, which are not necessarily a structured comment syntax.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing block and inline quote masking behavior and how user configuration reaches it. Confirm that a configured regex can ignore matching comment content, including the shell and editor-command examples, and add coverage for those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.