Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.37 KB

File metadata and controls

43 lines (31 loc) · 1.37 KB

Contributing

Thanks for helping make remove-comments better.

Setup

git clone https://github.com/isaka-james/comments-remover.git
cd comments-remover
cargo test

Everything runs on stable Rust 1.74 or newer with no dependencies.

House rules

  • The source contains zero comments, including doc comments. Choose names that make the code read on its own. If something truly needs prose, it belongs in docs/ARCHITECTURE.md.
  • No new dependencies.
  • cargo fmt and cargo clippy -- -D warnings must pass.
  • Every behavior change ships with a test.
  • When parsing is uncertain, keep the comment. Never risk breaking code.

Adding a language

  1. Add a Syntax definition in src/language/defs.rs, or reuse an existing one.
  2. Register it in src/language/registry.rs with extensions and file names.
  3. If the language has constructs the table cannot express, add a hook in src/engine/hooks.rs and wire it through HookId.
  4. Add a case to tests/language_matrix.rs covering a comment, a string that looks like a comment, and any tricky construct.
  5. Add a row to docs/LANGUAGES.md.

Commits

Use short lowercase prefixes matching the history: core:, test:, docs:, ci:, fix:. One logical change per commit.

Pull requests

Fill in the template, keep the diff focused, and make sure cargo test is green. Small, reviewed steps beat big drops.