https://github.com/simeg/commentective
:crystal_ball: CLI tool to locate comments and commented out code in your source code ("comment detective")
https://github.com/simeg/commentective
cli comments rust
Last synced: 12 months ago
JSON representation
:crystal_ball: CLI tool to locate comments and commented out code in your source code ("comment detective")
- Host: GitHub
- URL: https://github.com/simeg/commentective
- Owner: simeg
- License: mit
- Created: 2018-06-30T12:20:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T14:06:02.000Z (about 4 years ago)
- Last Synced: 2025-06-08T21:36:03.807Z (about 1 year ago)
- Topics: cli, comments, rust
- Language: Rust
- Homepage:
- Size: 188 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# commentective [](https://crates.io/crates/commentective)  [](https://codecov.io/gh/simeg/commentective)
`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](https://github.com/simeg/commentective/issues/new).
# 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.
```bash
USAGE:
commentective [FLAGS] [OPTIONS] ...
ARGS:
... 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 Only analyze files with this extension
-l, --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!](https://github.com/simeg/commentective/issues/new)
# Installation
```bash
$ cargo install commentective
```
# Contribute :zap:
Want to contribute to this project? A backlog is kept in the
[issues](https://github.com/simeg/commentective/issues), have a look!