#command-line-tool #cli #comments #rust

bin+lib commentective

CLI tool to locate comments and commented out code in your source code

8 releases (breaking)

new 0.8.0 Sep 15, 2020
0.7.0 Sep 14, 2020
0.6.0 Sep 12, 2020
0.5.0 Feb 24, 2019
0.1.0 Jul 8, 2018

#444 in Command line utilities

28 downloads per month

MIT license

40KB
1K SLoC

commentective Crate Status Build Status codecov

commentective (word play on comment detective) is a CLI tool that locates commented out code and comments in your project. Note that this tool assumes that your code is syntactically correct.

It will find single line comments and multi line comments. It supports a number of languages. If you find a case that commentective does not support, please submit an issue.

Usage

commentective is language agnostic, meaning you don't need to tell it what language your files are written in. It will look at the extension of the files and act accordingly.

USAGE:
    commentective [FLAGS] [OPTIONS] <FILES>...

ARGS:
    <FILES>...    Files to analyze

FLAGS:
    -c, --code            Print the code with comments
    -h, --help            Prints help information
    -i, --ignore-empty    Ignore printing files without comments
    -s, --short           Formats output with "file.ext:line" without colors. Only outputs files with comments.
    -V, --version         Prints version information

OPTIONS:
    -e, --extension <extension>    Only analyze files with this extension
    -l, --lang <lang>              Analyze as this language. Pass the extension, e.g. 'js', 'py', 'sh'

Supported languages

Language Supported
Bash/Shell ✔️
C ✔️
C# ✔️
C++ ✔️
CSS ✔️
Go ✔️
HTML ✔️
Java ✔️
JavaScript ✔️
Lua ✔️
PHP ✔️
Python ✔️
Ruby ✔️
Rust ✔️
Scala ✔️

Got a request for a language? Submit an issue!

Installation

$ cargo install commentective

Contribute ⚡

Want to contribute to this project? A backlog is kept in the issues, have a look!

Dependencies

~3MB
~55K SLoC