New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rubocop-git2

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rubocop-git2

  • 0.1.7
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

NOTE: this is a drop-in replacement for the unmaintained https://github.com/m4i/rubocop-git

Gem Version Build Status

RuboCop::Git

RuboCop for git diff.

Installation

Add or install rubocop-git2.

Usage

Examples

# check unstaged changes
rubocop-git

# check staged changes
rubocop-git --staged

# positional arguments are passed as git refs to git diff, e.g.:

# check both staged and unstaged changes
rubocop-git HEAD

# check the previous commit
rubocop-git HEAD~1 HEAD

# check changes between two tags
rubocop-git v1.0.0 v1.0.1

# check all changes in a branch in github actions
bundle exec rubocop-git origin/${{ github.base_ref }}

Options

Output of rubocop-git --help:

Usage: rubocop-git [options] [[commit] commit]
    -c, --config FILE                Specify configuration file
    -d, --debug                      Display debug info
    -D, --display-cop-names          Display cop names in offense messages
    -f, --format FORMAT              Set output format (see rubocop --help)
        --hound                      Hound compatibility mode
        --only COP1,COP2             Run only specific cops or departments
    -r, --require FILE               Require Ruby file
        --staged                     Inspect staged changes
        --version                    Display version

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc