face_control 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +10 -9
- data/.rubocop.yml +0 -3
- data/lib/face_control/inputs/rubocop_json.rb +10 -2
- data/lib/face_control/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20ccdb02b1275a56ed0c5a87ffc919d746f11ee0
|
4
|
+
data.tar.gz: c990afbc32fc9b6880e7d05a59cf162decc13a2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7450231dec6d6ff3cf5699001bddaaa008899c7db5d79d3c76c26b734a7496d2fe6214f9836ac7f3ce18dc3c37e1e400c54dcd664b70f5d95a46ad9fd2c686df
|
7
|
+
data.tar.gz: 8108d383f13c5c5107b54f4f49f4af90d16a3ad122cfed4084f5be33ce6046a0103a40a3ebc14f26317e0c1e4b129b1a8dd5577513855b9cd3aaf423ab9cfaf4
|
data/.gitignore
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
/
|
6
|
-
/
|
7
|
-
/
|
8
|
-
/
|
9
|
-
/
|
1
|
+
.bundle/
|
2
|
+
.yardoc
|
3
|
+
Gemfile.lock
|
4
|
+
_yardoc/
|
5
|
+
bin/
|
6
|
+
coverage/
|
7
|
+
doc/
|
8
|
+
pkg/
|
9
|
+
spec/reports/
|
10
|
+
tmp/
|
data/.rubocop.yml
CHANGED
@@ -22,7 +22,7 @@ module FaceControl
|
|
22
22
|
Comment.new(
|
23
23
|
file: file['path'],
|
24
24
|
line: offense['location']['line'],
|
25
|
-
text: text(offense)
|
25
|
+
text: text(offense, file)
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end.flatten
|
@@ -34,13 +34,17 @@ module FaceControl
|
|
34
34
|
JSON.parse(File.read(filename))
|
35
35
|
end
|
36
36
|
|
37
|
-
def text(offense)
|
37
|
+
def text(offense, file)
|
38
38
|
text = offense['message']
|
39
39
|
|
40
40
|
if (link = style_guide_url(offense))
|
41
41
|
text << " — [Guide](#{link})"
|
42
42
|
end
|
43
43
|
|
44
|
+
if can_be_autocorrected?(offense)
|
45
|
+
text << " (Run `rubocop -a #{file['path']}` to fix.)"
|
46
|
+
end
|
47
|
+
|
44
48
|
text
|
45
49
|
end
|
46
50
|
|
@@ -49,6 +53,10 @@ module FaceControl
|
|
49
53
|
cop_config = RuboCop::ConfigLoader.default_configuration[cop_name]
|
50
54
|
cop_config['StyleGuide']
|
51
55
|
end
|
56
|
+
|
57
|
+
def can_be_autocorrected?(offense)
|
58
|
+
!offense['corrected'].nil?
|
59
|
+
end
|
52
60
|
end
|
53
61
|
end
|
54
62
|
end
|
data/lib/face_control/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: face_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vassilevsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.2.2
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Checks Atlassian Stash pull requests and comments on issues in added code
|