econchick / econchick/interrogate
Feature Request: Flag for alternative formatting of line number output
- Dominant language
- Python
- Stars
- 676
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
**Is this a BUG REPORT or FEATURE REQUEST?**:
* [ ] bug
* [X] feature
## Description of Bug or Feature
I'm using `interrogate` a lot right now to go through projects and add missing docstrings (`- vv` flag mostly). VS Code (and other IDEs?) can convert the path to a file in the output as a link, so I can click to a file missing docstrings (technically with output from `interrogate`, I believe it's actually searching for the file. In my case, if the paths included another level or two, it would be a be proper link). If the path to a file is followed by `:line_number`, clicking the link jumps to the line of code.
It would be nice to have a flag which would include `file_path:line_number` in the output for each function found, so a user could jump to the function even faster.
So instead of something like this:
```
==================== Coverage for /Users/lynn/dev/interrogate/ ======================
--------------------------------- Detailed Coverage ---------------------------------
| Name | Status |
|-----------------------------------------------------------------------|-----------|
| tests/unit/__init__.py (module) | COVERED |
|-----------------------------------------------------------------------|-----------|
| tests/unit/test_badge_gen.py (module) | COVERED |
| test_save_badge (L14) | COVERED |
| test_get_badge (L35) | COVERED |
| test_get_color (L44) | COVERED |
| test_create (L61) | COVERED |
|-----------------------------------------------------------------------|-----------|
```
The user could ask for this type of output
```
==================== Coverage for /Users/lynn/dev/interrogate/ ======================
--------------------------------- Detailed Coverage ---------------------------------
| Name | Status |
|-----------------------------------------------------------------------|-----------|
| tests/unit/__init__.py (module) | COVERED |
|-----------------------------------------------------------------------|-----------|
| tests/unit/test_badge_gen.py (module) | COVERED |
| test_save_badge | COVERED |
| tests/unit/test_badge_gen.py:14 | |
| test_get_badge | COVERED |
| tests/unit/test_badge_gen.py:35 | |
| test_get_color | COVERED |
| tests/unit/test_badge_gen.py:44 | |
| test_create | COVERED |
| tests/unit/test_badge_gen.py:61 | |
|-----------------------------------------------------------------------|-----------|
```
I'm not sure the best way to format it all, and it would be "messier", but would make it really easy to jump through these functions. I mostly use VS Code, but I'm not sure if other IDEs have similar linking.
Contributor guide
Assessment
This issue has not been assessed yet.