rubocop 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/logo.png +0 -0
- data/assets/output.html.erb +261 -0
- data/lib/rubocop/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 559e608f152814f5300bb7abd0b4c3e094ae53149f9f99a4cef8c4b6dd0da2ab
|
4
|
+
data.tar.gz: fbee2cd4b7cf20eca1eeec13f67b43b32483a0c8b11c17829f705c9c529446f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9dd79f49f7bca665d5e9d05cc6e41a6ba5cdff9f4392b9ed5d8a25ec714966b661d8bfef677087cbd4b3ec29c55afb3dbe08e00ffbd7df34385f1ca60ec1312
|
7
|
+
data.tar.gz: e36d6e3f839d586fd2776767eb4eff2228c5378f90a56726497b5cc37b1b890f1da33d0c76b47cbfdb3e141debb5eeaee63f41914d03cbd2d2cd819361f5301e
|
data/assets/logo.png
ADDED
Binary file
|
@@ -0,0 +1,261 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset='UTF-8' />
|
5
|
+
<title>RuboCop Inspection Report</title>
|
6
|
+
<%# TODO: Clean up the messy markup and style definitions. %>
|
7
|
+
<style>
|
8
|
+
* {
|
9
|
+
-webkit-box-sizing: border-box;
|
10
|
+
-moz-box-sizing: border-box;
|
11
|
+
box-sizing: border-box;
|
12
|
+
}
|
13
|
+
|
14
|
+
body, html {
|
15
|
+
font-size: 62.5%;
|
16
|
+
}
|
17
|
+
body {
|
18
|
+
background-color: #ecedf0;
|
19
|
+
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
20
|
+
margin: 0;
|
21
|
+
}
|
22
|
+
code {
|
23
|
+
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
24
|
+
font-size: 85%;
|
25
|
+
}
|
26
|
+
#header {
|
27
|
+
background: #f9f9f9;
|
28
|
+
color: #333;
|
29
|
+
border-bottom: 3px solid #ccc;
|
30
|
+
height: 50px;
|
31
|
+
padding: 0;
|
32
|
+
}
|
33
|
+
#header .logo {
|
34
|
+
float: left;
|
35
|
+
margin: 5px 12px 7px 20px;
|
36
|
+
width: 38px;
|
37
|
+
height: 38px;
|
38
|
+
}
|
39
|
+
#header .title {
|
40
|
+
display: inline-block;
|
41
|
+
float: left;
|
42
|
+
height: 50px;
|
43
|
+
font-size: 2.4rem;
|
44
|
+
letter-spacing: normal;
|
45
|
+
line-height: 50px;
|
46
|
+
margin: 0;
|
47
|
+
}
|
48
|
+
|
49
|
+
.information, #offenses {
|
50
|
+
width: 100%;
|
51
|
+
padding: 20px;
|
52
|
+
color: #333;
|
53
|
+
}
|
54
|
+
#offenses {
|
55
|
+
padding: 0 20px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.information .infobox {
|
59
|
+
border-left: 3px solid;
|
60
|
+
border-radius: 4px;
|
61
|
+
background-color: #fff;
|
62
|
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
63
|
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
64
|
+
padding: 15px;
|
65
|
+
border-color: #0088cc;
|
66
|
+
font-size: 1.4rem;
|
67
|
+
}
|
68
|
+
.information .infobox .info-title {
|
69
|
+
font-size: 1.8rem;
|
70
|
+
line-height: 2.2rem;
|
71
|
+
margin: 0 0 0.5em;
|
72
|
+
}
|
73
|
+
.information .offenses-list li {
|
74
|
+
line-height: 1.8rem
|
75
|
+
}
|
76
|
+
.information .offenses-list {
|
77
|
+
padding-left: 20px;
|
78
|
+
margin-bottom: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
#offenses .offense-box {
|
82
|
+
border-radius: 4px;
|
83
|
+
margin-bottom: 20px;
|
84
|
+
background-color: #fff;
|
85
|
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
86
|
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
87
|
+
}
|
88
|
+
.fixed .box-title {
|
89
|
+
position: fixed;
|
90
|
+
top: 0;
|
91
|
+
z-index: 10;
|
92
|
+
width: 100%;
|
93
|
+
}
|
94
|
+
.box-title-placeholder {
|
95
|
+
display: none;
|
96
|
+
}
|
97
|
+
.fixed .box-title-placeholder {
|
98
|
+
display: block;
|
99
|
+
}
|
100
|
+
#offenses .offense-box .box-title h3, #offenses .offense-box .box-title-placeholder h3 {
|
101
|
+
color: #33353f;
|
102
|
+
background-color: #f6f6f6;
|
103
|
+
font-size: 2rem;
|
104
|
+
line-height: 2rem;
|
105
|
+
display: block;
|
106
|
+
padding: 15px;
|
107
|
+
border-radius: 5px;
|
108
|
+
margin: 0;
|
109
|
+
}
|
110
|
+
#offenses .offense-box .offense-reports {
|
111
|
+
padding: 0 15px;
|
112
|
+
}
|
113
|
+
#offenses .offense-box .offense-reports .report {
|
114
|
+
border-bottom: 1px dotted #ddd;
|
115
|
+
padding: 15px 0px;
|
116
|
+
position: relative;
|
117
|
+
font-size: 1.3rem;
|
118
|
+
}
|
119
|
+
#offenses .offense-box .offense-reports .report:last-child {
|
120
|
+
border-bottom: none;
|
121
|
+
}
|
122
|
+
#offenses .offense-box .offense-reports .report pre code {
|
123
|
+
display: block;
|
124
|
+
background: #000;
|
125
|
+
color: #fff;
|
126
|
+
padding: 10px 15px;
|
127
|
+
border-radius: 5px;
|
128
|
+
line-height: 1.6rem;
|
129
|
+
}
|
130
|
+
#offenses .offense-box .offense-reports .report .location {
|
131
|
+
font-weight: bold;
|
132
|
+
}
|
133
|
+
#offenses .offense-box .offense-reports .report .message code {
|
134
|
+
padding: 0.3em;
|
135
|
+
background-color: rgba(0,0,0,0.07);
|
136
|
+
border-radius: 3px;
|
137
|
+
}
|
138
|
+
.severity {
|
139
|
+
text-transform: capitalize;
|
140
|
+
font-weight: bold;
|
141
|
+
}
|
142
|
+
.highlight {
|
143
|
+
padding: 2px;
|
144
|
+
border-radius: 2px;
|
145
|
+
font-weight: bold;
|
146
|
+
}
|
147
|
+
<%- SEVERITY_COLORS.each do |severity, color| %>
|
148
|
+
.severity.<%= severity %> {
|
149
|
+
color: <%= color %>;
|
150
|
+
}
|
151
|
+
.highlight.<%= severity %> {
|
152
|
+
background-color: <%= color.fade_out(0.4) %>;
|
153
|
+
border: 1px solid <%= color.fade_out(0.6) %>;
|
154
|
+
}
|
155
|
+
<%- end %>
|
156
|
+
footer {
|
157
|
+
margin-bottom: 20px;
|
158
|
+
margin-right: 20px;
|
159
|
+
font-size: 1.3rem;
|
160
|
+
color: #777;
|
161
|
+
text-align: right;
|
162
|
+
}
|
163
|
+
.extra-code {
|
164
|
+
color: #ED9C28
|
165
|
+
}
|
166
|
+
</style>
|
167
|
+
|
168
|
+
<script>
|
169
|
+
(function() {
|
170
|
+
// floating headers. requires classList support.
|
171
|
+
if (!('classList' in document.createElement("_"))) return;
|
172
|
+
|
173
|
+
var loaded = false,
|
174
|
+
boxes,
|
175
|
+
boxPositions;
|
176
|
+
|
177
|
+
window.onload = function() {
|
178
|
+
var scrollY = window.scrollY;
|
179
|
+
boxes = document.querySelectorAll('.offense-box');
|
180
|
+
boxPositions = [];
|
181
|
+
for (var i = 0; i < boxes.length; i++)
|
182
|
+
// need to add scrollY because the page might be somewhere other than the top when loaded.
|
183
|
+
boxPositions[i] = boxes[i].getBoundingClientRect().top + scrollY;
|
184
|
+
loaded = true;
|
185
|
+
};
|
186
|
+
|
187
|
+
window.onscroll = function() {
|
188
|
+
if (!loaded) return;
|
189
|
+
var i,
|
190
|
+
idx,
|
191
|
+
scrollY = window.scrollY;
|
192
|
+
for (i = 0; i < boxPositions.length; i++) {
|
193
|
+
if (scrollY <= boxPositions[i] - 1) {
|
194
|
+
idx = i;
|
195
|
+
break;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
if (typeof idx == 'undefined') idx = boxes.length;
|
199
|
+
if (idx > 0)
|
200
|
+
boxes[idx - 1].classList.add('fixed');
|
201
|
+
for (i = 0; i < boxes.length; i++) {
|
202
|
+
if (i < idx) continue;
|
203
|
+
boxes[i].classList.remove('fixed');
|
204
|
+
}
|
205
|
+
};
|
206
|
+
})();
|
207
|
+
</script>
|
208
|
+
</head>
|
209
|
+
<body>
|
210
|
+
<div id="header">
|
211
|
+
<img class="logo" src="data:image/png;base64,<%= base64_encoded_logo_image %>" alt="">
|
212
|
+
<h1 class="title">RuboCop Inspection Report</h1>
|
213
|
+
</div>
|
214
|
+
<div class="information">
|
215
|
+
<div class="infobox">
|
216
|
+
<div class="total">
|
217
|
+
<%= pluralize(files.count, 'file') %> inspected,
|
218
|
+
<%= pluralize(summary.offense_count, 'offense', no_for_zero: true) %> detected:
|
219
|
+
</div>
|
220
|
+
<ul class="offenses-list">
|
221
|
+
<% files.each do |file| %>
|
222
|
+
<% next if file.offenses.none? %>
|
223
|
+
<li>
|
224
|
+
<a href="#offense_<%= relative_path(file.path) %>">
|
225
|
+
<%= relative_path(file.path) %> - <%= pluralize(file.offenses.count, 'offense') %>
|
226
|
+
</a>
|
227
|
+
</li>
|
228
|
+
<% end %>
|
229
|
+
</ul>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
<div id="offenses">
|
233
|
+
<% files.each do |file| %>
|
234
|
+
<% if file.offenses.any? %>
|
235
|
+
<div class="offense-box" id="offense_<%= relative_path(file.path) %>">
|
236
|
+
<div class="box-title-placeholder"><h3> </h3></div>
|
237
|
+
<div class="box-title"><h3><%= relative_path(file.path) %> - <%= pluralize(file.offenses.count, 'offense') %></h3></div>
|
238
|
+
<div class="offense-reports">
|
239
|
+
<% file.offenses.each do |offense| %>
|
240
|
+
<div class="report">
|
241
|
+
<div class="meta">
|
242
|
+
<span class="location">Line #<%= offense.location.line %></span> –
|
243
|
+
<span class="severity <%= offense.severity %>"><%= offense.severity %>:</span>
|
244
|
+
<span class="message"><%= decorated_message(offense) %></span>
|
245
|
+
</div>
|
246
|
+
<% unless offense.location.source_line.strip.empty? %>
|
247
|
+
<pre><code><%= highlighted_source_line(offense) %></code></pre>
|
248
|
+
<% end %>
|
249
|
+
</div>
|
250
|
+
<% end %>
|
251
|
+
</div>
|
252
|
+
</div>
|
253
|
+
<% end %>
|
254
|
+
<% end %>
|
255
|
+
</div>
|
256
|
+
<footer>
|
257
|
+
Generated by <a href="https://github.com/rubocop-hq/rubocop">RuboCop</a>
|
258
|
+
<span class="version"><%= RuboCop::Version::STRING %></span>
|
259
|
+
</footer>
|
260
|
+
</body>
|
261
|
+
</html>
|
data/lib/rubocop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -169,6 +169,8 @@ extra_rdoc_files:
|
|
169
169
|
files:
|
170
170
|
- LICENSE.txt
|
171
171
|
- README.md
|
172
|
+
- assets/logo.png
|
173
|
+
- assets/output.html.erb
|
172
174
|
- config/default.yml
|
173
175
|
- exe/rubocop
|
174
176
|
- lib/rubocop.rb
|