rubocop-stylecheck 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubocop/stylecheck.rb +1 -1
- data/lib/rubocop/stylecheck/cli.rb +0 -23
- data/lib/rubocop/stylecheck/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968038516430ec2b7d4c74b20a51ccf9e2e2f553
|
4
|
+
data.tar.gz: 24b4f04eb27a2a97e177f40e5326fe5004ca0f1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82775af1605c9e436db189c733ef506fdbb7fa899e3935c3d8307efb1393a11b88051b225fa9c7840c1878bff3f69d9c3628b0e4d368aa8278cfef1b23121bcf
|
7
|
+
data.tar.gz: bc84e703984623fe55ffa97b39dce10043a9a5aed995d0a2f2c71cb429ce75d6d5bfacec0ddcfa85b79d8b300272ea7bd2a5297f8b51ff64e18578f1b0f8ac8f
|
data/lib/rubocop/stylecheck.rb
CHANGED
@@ -3,29 +3,6 @@ module Rubocop
|
|
3
3
|
module Cli
|
4
4
|
class << self
|
5
5
|
def run(options)
|
6
|
-
if Rubocop::Stylecheck.direct
|
7
|
-
direct_run(options)
|
8
|
-
else
|
9
|
-
run_via_sh(options)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def direct_run(options)
|
14
|
-
require "rubocop"
|
15
|
-
require "benchmark"
|
16
|
-
|
17
|
-
cli = RuboCop::CLI.new
|
18
|
-
result = 0
|
19
|
-
|
20
|
-
time = Benchmark.realtime do
|
21
|
-
result = cli.run(options)
|
22
|
-
end
|
23
|
-
|
24
|
-
puts "Finished in #{time} seconds" if cli.options[:debug]
|
25
|
-
exit result
|
26
|
-
end
|
27
|
-
|
28
|
-
def run_via_sh(options)
|
29
6
|
system "bundle exec rubocop #{options.join(' ')}" do |ok, _res|
|
30
7
|
abort "Fix code style errors" unless ok
|
31
8
|
end
|