Skip to content

Commit c4b4c1f

Browse files
docs: added readme docs
1 parent 9ef8e88 commit c4b4c1f

File tree

1 file changed

+83
-9
lines changed

1 file changed

+83
-9
lines changed

README.md

Lines changed: 83 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,97 @@ TODO: Delete this and the text above, and describe your gem
66

77
## Installation
88

9-
Add this line to your application's Gemfile:
9+
1. Install the codeclimate cli:
10+
```
11+
brew tap codeclimate/formulae
12+
brew install codeclimate
13+
```
14+
15+
2. Add a `.codeclimate.yml` config file eg:
16+
```
17+
---
18+
version: "2"
19+
plugins:
20+
rubocop:
21+
enabled: true
22+
channel: rubocop-1-36-0
23+
reek:
24+
enabled: true
25+
26+
exclude_patterns:
27+
- config/
28+
- db/
29+
- dist/
30+
- features/
31+
- public/
32+
- "**/node_modules/"
33+
- script/
34+
- "**/spec/"
35+
- "**/test/"
36+
- "**/tests/"
37+
- Tests/
38+
- "**/vendor/"
39+
- "**/*_test.go"
40+
- "**/*.d.ts"
41+
- "**/*.min.js"
42+
- "**/*.min.css"
43+
- "**/__tests__/"
44+
- "**/__mocks__/"
45+
- "/.gitlab/"
46+
- coverage/
47+
```
48+
49+
3. Install the gem
50+
51+
Add this line to your application's Gemfile:
52+
53+
```ruby
54+
gem 'codeclimate_diff'
55+
```
56+
57+
Install the gem:
58+
59+
```bash
60+
$ bundle install
1061
11-
```ruby
12-
gem 'codeclimate_diff'
13-
```
62+
# OR just install it locally
63+
$ gem install codeclimate_diff
64+
```
1465
15-
And then execute:
66+
Then generate the executable:
1667
17-
$ bundle install
68+
$ bundle binstubs codeclimate_diff
1869
19-
Or install it yourself as:
2070
21-
$ gem install codeclimate_diff
71+
4. Run the baseline and commit the result to the repo
72+
73+
```
74+
./codeclimate_diff --baseline
75+
```
2276
2377
## Usage
2478
25-
TODO: Write usage instructions here
79+
1. Create a feature branch for your work, and reset the baseline + commit (5 mins)
80+
81+
2. Do some work
82+
83+
3. Check if you've added any issues (about 10 secs per code file changed on your branch)
84+
85+
```
86+
# runs on all code files changed in your branch
87+
./codeclimate_diff
88+
89+
OR
90+
91+
# filters the changed files in your branch futher
92+
./codeclimate_diff --pattern places
93+
94+
OR
95+
96+
# only shows the new and fixed issues
97+
./codeclimate_diff --new-only
98+
```
99+
4. Now you have time to fix the issues yay!
26100
27101
## Development
28102

0 commit comments

Comments
 (0)