A VS Code extension that detects speciesist language in code, comments, and documentation in real time — and offers one-click Quick Fix replacements with clearer alternatives. It covers 65+ patterns: idioms that trivialize animal harm, industry euphemisms (e.g. "processing plant", "livestock"), and developer-specific terms (e.g. "cattle vs. pets", "dogfooding"). It is the IDE-level layer of a suite that enforces the same canonical rule dictionary across pre-commit hooks, CI, ESLint, PR review automation, and AI agent runtimes.
Note
This project is part of the Open Paws ecosystem — AI infrastructure for the animal liberation movement. Explore the full platform →
- Install — search for "Animal Violence Language Scanner" in the VS Code Extensions panel, or install from the VS Marketplace.
- Open any file — the extension activates immediately for all file types.
- See violations — speciesist phrases are underlined; the Problems panel (
Ctrl+Shift+M) lists each match with its suggested alternative. - Apply Quick Fix — place your cursor on a flagged phrase and press
Ctrl+.(or click the lightbulb icon), then pressEnterto apply the replacement. - Configure — add
noAnimalViolence.enableornoAnimalViolence.severityto yoursettings.jsonto tune behavior per workspace.
git clone https://github.com/Open-Paws/vscode-no-animal-violence.git
cd vscode-no-animal-violence
npx @vscode/vsce package
# Then: VS Code Command Palette → "Extensions: Install from VSIX..." → select the .vsix fileOpen this repository in VS Code and press F5. A new VS Code window opens with the extension loaded and ready to test immediately.
The extension scans every open document using 65+ case-insensitive regex patterns with word boundaries. Matches appear as squiggly underlines at warning severity by default. The Problems panel (Ctrl+Shift+M) shows the full list with suggested alternatives.
Example: typing // TODO: don't beat a dead horse here triggers:
Animal violence language: "beat a dead horse". Consider: "belabor the point"
Place the cursor on a flagged phrase and press Ctrl+. to see the replacement action. The fix preserves the original casing — if the phrase starts with an uppercase letter, the replacement does too. The action is marked as the preferred fix, so Ctrl+. → Enter applies it in one keystroke.
The extension activates for every file type (onLanguage:*). It scans raw document text, so it catches speciesist phrases in comments, string literals, documentation, Markdown, shell scripts, YAML configs, and anywhere else text appears.
Scanning and severity are configurable per workspace. Changes take effect immediately without restarting — all visible editors are rescanned when settings change.
| Category | Examples |
|---|---|
| Idioms | "beat a dead horse", "kill two birds with one stone", "let the cat out of the bag" |
| Industry euphemisms | "livestock" → farmed animals, "processing plant" → slaughterhouse, "humane slaughter" → slaughter |
| Developer terms | "cattle vs. pets" → ephemeral vs. persistent, "dogfooding" → self-hosting, "code monkey" → developer |
| Tech terminology | "master/slave" → primary/replica, "whitelist/blacklist" → allowlist/denylist, "kill the process" → terminate the process |
The full pattern dictionary (65+ entries) is in extension.js. Patterns are auto-generated from the project-compassionate-code pipeline — submit pattern additions through that pipeline, not as direct edits to extension.js.
Set these in your settings.json (user or workspace):
| Setting | Type | Default | Description |
|---|---|---|---|
noAnimalViolence.enable |
boolean | true |
Enable or disable scanning globally |
noAnimalViolence.severity |
string | "warning" |
Diagnostic severity: "error", "warning", "information", or "hint" |
Note:
package.jsoncurrently declares settings under thespeciesism.*namespace. The runtime code readsnoAnimalViolence.*. UsenoAnimalViolence.*in yoursettings.jsonuntil this discrepancy is resolved.
Example workspace settings:
{
"noAnimalViolence.enable": true,
"noAnimalViolence.severity": "information"
}- Pattern source of truth — no-animal-violence
- Pattern generation pipeline — project-compassionate-code
- Full ecosystem tool list
- Contributing — proposing new patterns
Internal structure
Single-file, no-build architecture — the entire extension is extension.js with no bundler or compilation step. VS Code requires ^1.74.0.
Three responsibilities, kept separate:
-
Pattern dictionary (
PATTERNSarray) — auto-generated array of{ pattern, phrase, suggest }objects. Case-insensitive RegExp with word boundaries. Longer/more-specific patterns listed first to avoid partial shadowing. Do not edit this array manually. -
Diagnostic provider (
scanDocumentfunction) — readsnoAnimalViolence.enableandnoAnimalViolence.severityfrom workspace config, iteratesPATTERNSagainst the document text, createsvscode.Diagnosticobjects with_suggestionstashed for Quick Fix access. Scans are debounced at 300 ms on change events, immediate on save. -
Code action provider (
NoAnimalViolenceCodeActionProvider) — reads_suggestionfrom each matching diagnostic, preserves original casing, creates aQuickFixCodeActionmarked asisPreferred. Registered for{ scheme: "file", language: "*" }.
Extension lifecycle:
activate— creates theDiagnosticCollection, registers the code-action provider, wires uponDidOpenTextDocument,onDidChangeTextDocument,onDidSaveTextDocument,onDidCloseTextDocument, andonDidChangeConfigurationlisteners.deactivate— clears the debounce timer, clears and disposes theDiagnosticCollection.
Key files:
| File | Purpose |
|---|---|
extension.js |
Full extension — pattern dictionary, diagnostics, Quick Fix provider, lifecycle |
package.json |
Extension manifest, activation events (onLanguage:*), VS Code config schema |
tests/placeholder.test.js |
Placeholder test suite (Node.js built-in test runner) |
biome.json |
Biome linter configuration |
.pre-commit-config.yaml |
Pre-commit hooks |
No external runtime dependencies. Dev dependency: @biomejs/biome for linting.
Issues and pull requests are welcome at Open-Paws/vscode-no-animal-violence. If you work in animal advocacy or want to help build movement infrastructure, this is a good first project — the codebase is a single JavaScript file with no build step.
# Package the extension as a .vsix file
npx @vscode/vsce package
# Run the placeholder test suite (Node.js built-in test runner)
node --test tests/placeholder.test.js
# Run the linter (Biome)
npx @biomejs/biome check .
# Maintain desloppify score ≥85
desloppify scan --path .- Open this repository in VS Code.
- Press
F5— a new VS Code window opens. - Open any file and type a known phrase (e.g.
// beat a dead horse). - Verify: squiggly underline appears, Problems panel shows the diagnostic,
Ctrl+.offers the Quick Fix. - Verify
noAnimalViolence.enable: falsesuppresses all diagnostics. - Verify that changing
noAnimalViolence.severityto"error"updates the squiggly color without restarting.
Pattern changes go through the project-compassionate-code auto-generation pipeline. To propose a new pattern, open an issue with:
- The phrase to detect
- Why it is speciesist
- The suggested alternative
- A regex that matches it with word boundaries
- Single-file, no-build architecture — resist adding a build step or bundler.
- Every catch block must handle a specific error; never suppress silently.
- New patterns require manual verification in the Extension Development Host before release.
- Run
desloppify scan --path .and maintain a score of 85 or higher.
This extension is the IDE layer of a suite that enforces the same canonical rule dictionary across the full developer workflow:
| Tool | Enforcement point |
|---|---|
| This extension | Real-time, in the editor as you type |
| no-animal-violence | Canonical rule dictionary (source of truth) |
| no-animal-violence-pre-commit | Local git commit hook |
| semgrep-rules-no-animal-violence | CI pipeline (Semgrep) |
| eslint-plugin-no-animal-violence | ESLint / JS/TS linting |
| danger-plugin-no-animal-violence | PR review automation (Danger.js) |
| reviewdog-no-animal-violence | PR inline annotations (reviewdog) |
| no-animal-violence-action | GitHub Actions CI check |
| vale-no-animal-violence | Prose linting (Vale) |
The extension is published under the open-paws publisher ID on the VS Marketplace. Marketplace install metrics are not yet instrumented into the org's Lever 3 tracking — this is a known gap noted in the strategy repo.
The extension is recommended as the standard real-time language checker for all Open Paws developers and is included in contributor onboarding setup instructions.
MIT — Open Paws, a 501(c)(3) nonprofit.
Pattern dictionary sourced from the no-animal-violence canonical rule set, auto-generated via the project-compassionate-code pipeline.
Academic grounding:
- Dunayer, J. (2001). Animal Equality: Language and Liberation. Ryce Publishing.
- Stibbe, A. (2012). Animals Erased: Discourse, Ecology and Reconnection with the Natural World. Wesleyan University Press.
- Singer, P. (1975). Animal Liberation. HarperCollins.
Donate · Discord · openpaws.ai · Volunteer
