Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 444 Bytes

File metadata and controls

13 lines (9 loc) · 444 Bytes

java_comment_extractor

A fast, offset-preserving Java comment and string extractor.

  • Extracts comments (//, /* ... */) and optionally string contents.
  • Replaces non-comment, non-string code with spaces, preserving line/column alignment.
  • Supports Java 15+ triple-quoted """ text blocks.
  • Useful for grammar checking with Flycheck + LanguageTool or Vale.

Usage

java_comment_extractor [--preserve-strings] <input-file>