Giter Site home page Giter Site logo

leo-holanda / changes-counter Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 2.85 MB

A VS Code extension that helps developers control the size of their pull requests

Home Page: https://marketplace.visualstudio.com/items?itemName=LeonardoHolanda.changes-counter

License: MIT License

TypeScript 97.55% Dockerfile 2.45%
diff extension git vscode vscode-extension typescript node nodejs pull-request pull-requests pullrequest pullrequests

changes-counter's Introduction

Changes Counter

Visual Studio Marketplace Version Visual Studio Marketplace Installs GitHub

A VS Code extension that helps developers control their pull requests size.

Changes Counter demo

Contents

Features

  • Show the changes count in a VS Code status bar item to help you track the changes quantity
  • Changes count is updated everytime you save a file
  • When you exceed a changes quantity threshold:
    • The status bar item color changes
    • A notification is sent to warn you
  • Creating an ignore file allows the extension to ignore files and patterns when counting changes

Installation

Open VS Code, press Ctrl + P and enter this command

ext install LeonardoHolanda.changes-counter

You can also search for "Changes Counter" in the Extensions Tab search, find the extension and install it there.

Usage

After you installed the extension and opened your repository folder for the first time, the extension will try to:

  • Set the default comparison branch to your current branch
  • Set the default changes threshold to 400

You can change both the comparison branch and changes threshold anytime you want by pressing cmd + shift + p and executing one of the extension commands:

  • Changes Counter: Set comparison branch

  • Changes Counter: Set changes quantity threshold

Or clicking the tooltip links.

From now on, anytime you save a file the status bar item at the bottom will update showing how many changes were made between your working tree and your comparison branch (e.g: Changes: 64).

Important

For the extension to work, you must open a folder in your workspace that is a Git repository.

If you are experiencing any prolem, please do the following:

  • Open the panel where the terminal is located.
  • Select the Output tab.
  • At the dropdown in the right upper part, select the Changes Counter channel.
  • Check the logs.

If the problem is complicated or the logs aren't helpful, please copy the logs and create an issue with them. It will be very appreciated!

Ignore file

The ignore file name must be .ccignore. For this feature to work, you must create the file in the root of your workspace folder. Then, you can write the files path and patterns you want to ignore like it is written in the .gitignore file.

Extension Settings

This extension contributes the following settings:

  • changesCounter.disableStatusBarIconColorChange: Enable/disable the status bar item color change when you exceed the changes quantity threshold.

  • changesCounter.disableNotifications: Enable/disable the notification when you exceed the changes quantity threshold.

  • changesCounter.showInsertionsOnStatusBar: Enable/disable showing the insertions count on status bar.

  • changesCounter.showDeletionsOnStatusBar: Enable/disable showing the deletions count on status bar.

Contributing

Feel free to submit any issues or enhancement requests! I will do my best to fix or implement it. Already have a solution? Pull requests are also welcome!

Built with

  • TypeScript
  • Node.js

License

MIT

changes-counter's People

Contributors

leo-holanda avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

changes-counter's Issues

command 'changes-counter.setComparisonBranch' not found

I'm trying to set initial values using command palette but getting the following error:

command 'changes-counter.setComparisonBranch' not found

The same "not found" error is shown for the lines threshold command as well.

macOS 14.3.1
VS Code 1.87.0
Changes Counter 1.5.5

Allow Users to also list the 'Insertions' and 'Deletions' in the status bar?

I suppose this would be a feature request, but is there anyway to allow users to list not just the total 'Changes' in the status bar, but also the 'Insertions' and 'Deletions'. Perhaps a setting, that enables us to toggle each of them true/false to display in the bottom(?). It seems the only way to view that information is to hover for several seconds over the 'Changes'.

It would be quite great if I could have an eye on all three values. Thanks again!

Stuck in Activating

I use Windows, both the regular and Insiders edition. Extension and app are up to date.

When I open VSCode without opening a specific folder, the output panel for the Changes Counter extension will say "The extension couldn't find a folder in your workspace. Open a folder that has git initialized for the extension to work." That's great.

But when I open a folder with git initialized, nothing appears in the output panel. Nothing appears in my status bar that refers to the extension and there is no apparent change tracking. The extension is installed, and I can configure its two settings, but nothing actually happens.

I can open a menu called "Running Extensions" from the extensions sidebar. It indicates that the extension is stuck "Activating...". I don't really know of any way to dig deeper than that.

status bar not updating

After installing the extension, the status bar only shows Changes: ?. There is no output in the Panel. I'm assuming there are additional steps needed, but the documentation does not include anything regarding this.

Things I tried:

  • restarting VS Code.
  • switching to different files and file types
  • adjusting the Settings
  • pressing CMD+SHIFT+P > searching for "Counter" > setting a threshold value.w

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.