Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ul/did-i-forget
Did I forget ...?
https://github.com/ul/did-i-forget
code-analysis git-history
Last synced: 3 months ago
JSON representation
Did I forget ...?
- Host: GitHub
- URL: https://github.com/ul/did-i-forget
- Owner: ul
- Created: 2020-04-13T11:49:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T22:39:21.000Z (over 3 years ago)
- Last Synced: 2024-10-10T23:32:55.607Z (3 months ago)
- Topics: code-analysis, git-history
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Did I forget ...?
A small utility to find files highly coupled to the changes in your branch based on git history.
Helps to double-check if you forgot to update something related to the files you worked on.## Installation
```
$ yarn global add did-i-forget
```## Usage
```
$ did-i-forget -c
```## Example output
```
❯ did-i-forget -c -n 3
Getting changed paths... Done.
2 files changed against the origin/master
Is cache valid? Yes!
Processed 401 commits.
Generating report... Enjoy!┌────────────────────┬──────────────────────────────────────────┬────────────────┬────────────┐
│ Changed file │ Coupled file │ Shared commits │ Confidence │
├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
│ src/diagnostics.rs │ src/language_features/cquery.rs │ 13 │ 0.72 │
├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
│ src/diagnostics.rs │ src/language_features/document_symbol.rs │ 7 │ 0.7 │
├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
│ src/diagnostics.rs │ src/language_features/signature_help.rs │ 6 │ 0.67 │
└────────────────────┴──────────────────────────────────────────┴────────────────┴────────────┘
```
In this example `did-i-forget` tells me that I worked on `src/diagnostics.rs` and I might want to look into `src/language_features/cquery.rs` as the former was changed in 72% of commits which addressed `src/language_features/cquery.rs` in the past.## Options
### Threshold
`-t 0.5`, `--threshold 0.5`
Set a minimum confidence for a coupled file to be reported.
### Top N
`-n 1`, `--ntop 1`
How many top coupled files to show for each changed file.
### Cache
#### Enable git log caching
`-c`, `--cache`
Cache is stamped by a master revision head SHA reference and is invalidated when it changes.
You really want to use it for repeated runs in large repositories as difference can reach orders of magnitude.#### Custom cache path
`--cache-file .did-i-forget-cache`
### Output format
`-f table`, `--format table`
Print result as a nicely layed out `table` or just a raw `csv`.
### Master revision
`-m origin/master`, `--master origin/master`
Specify a revision (usually a branch) to diff current state against to find out changed files.
### Quiet mode
`-q`, `--quiet`
Don't output progress information, only print result.
Note that logging goes into stderr and result into stdout so you still can pipe result when logging enabled.