@@ -6,23 +6,97 @@ TODO: Delete this and the text above, and describe your gem
6
6
7
7
## Installation
8
8
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
10
61
11
- ``` ruby
12
- gem ' codeclimate_diff'
13
- ```
62
+ # OR just install it locally
63
+ $ gem install codeclimate_diff
64
+ ```
14
65
15
- And then execute :
66
+ Then generate the executable :
16
67
17
- $ bundle install
68
+ $ bundle binstubs codeclimate_diff
18
69
19
- Or install it yourself as:
20
70
21
- $ gem install codeclimate_diff
71
+ 4. Run the baseline and commit the result to the repo
72
+
73
+ ```
74
+ ./codeclimate_diff --baseline
75
+ ```
22
76
23
77
## Usage
24
78
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!
26
100
27
101
## Development
28
102
0 commit comments