Coder Social home page Coder Social logo

did-i-forget's Introduction

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.

did-i-forget's People

Contributors

dependabot[bot] avatar ul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.