README.md in rubocop-git2-0.1.4 vs README.md in rubocop-git2-0.1.5
- old
+ new
@@ -7,18 +7,47 @@
RuboCop for git diff.
## Installation
-Add or install `rubocop-git2`. NOT YET RELEASED - will happen soon!
+Add or install `rubocop-git2`.
## Usage
+### Examples
+
+```sh
+# 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
- -r, --require FILE Require Ruby file
-d, --debug Display debug info
-D, --display-cop-names Display cop names in offense messages
- --only COP1,COP2 Run only specific cops or departments
- --cached git diff --cached
- --staged synonym of --cached
+ -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