fasterer 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fasterer.yml +0 -1
- data/README.md +0 -1
- data/lib/fasterer/analyzer.rb +0 -6
- data/lib/fasterer/offense.rb +0 -3
- data/lib/fasterer/version.rb +1 -1
- metadata +1 -5
- data/spec/lib/fasterer/analyzer/01_parallel_assignment_spec.rb +0 -11
- data/spec/support/analyzer/01_parallel_assignment.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab37d8cc76a406119068194b853aadcc2a7b0de7
|
4
|
+
data.tar.gz: 84fdbcf5c461d49a07438b41abbe1ffad9e16999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1b3937b1aee5f08d2f48080407307aa960990147b1d48fb6976882fc47703330efbe1509786a6e9a4d1b7ee3577cf8fa50c4669374376e688a386ceb97fe0ad
|
7
|
+
data.tar.gz: 0c54541f6b2cf02a3146e65b4376f85c53262cc1b6a8ed0a30dcf9c2447ddef0ec3ac0421e2fe6111c2e9d8da22ba1c2b37a73b5431a5a244eea5590f83ce16d
|
data/.fasterer.yml
CHANGED
data/README.md
CHANGED
data/lib/fasterer/analyzer.rb
CHANGED
@@ -52,8 +52,6 @@ module Fasterer
|
|
52
52
|
scan_method_definitions(element)
|
53
53
|
when :call, :iter
|
54
54
|
scan_method_calls(element)
|
55
|
-
when :masgn
|
56
|
-
scan_parallel_assignment(element)
|
57
55
|
when :for
|
58
56
|
scan_for_loop(element)
|
59
57
|
when :resbody
|
@@ -77,10 +75,6 @@ module Fasterer
|
|
77
75
|
end
|
78
76
|
end
|
79
77
|
|
80
|
-
def scan_parallel_assignment(element)
|
81
|
-
errors.push(Fasterer::Offense.new(:parallel_assignment, element.line))
|
82
|
-
end
|
83
|
-
|
84
78
|
def scan_for_loop(element)
|
85
79
|
errors.push(Fasterer::Offense.new(:for_loop_vs_each, element.line))
|
86
80
|
end
|
data/lib/fasterer/offense.rb
CHANGED
data/lib/fasterer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damir Svrtan
|
@@ -145,7 +145,6 @@ files:
|
|
145
145
|
- lib/fasterer/scanners/rescue_call_scanner.rb
|
146
146
|
- lib/fasterer/token.rb
|
147
147
|
- lib/fasterer/version.rb
|
148
|
-
- spec/lib/fasterer/analyzer/01_parallel_assignment_spec.rb
|
149
148
|
- spec/lib/fasterer/analyzer/02_rescue_vs_respond_to_spec.rb
|
150
149
|
- spec/lib/fasterer/analyzer/03_module_eval_spec.rb
|
151
150
|
- spec/lib/fasterer/analyzer/06_shuffle_first_vs_sample_spec.rb
|
@@ -173,7 +172,6 @@ files:
|
|
173
172
|
- spec/lib/fasterer/method_definition_spec.rb
|
174
173
|
- spec/lib/fasterer/rescue_call_spec.rb
|
175
174
|
- spec/spec_helper.rb
|
176
|
-
- spec/support/analyzer/01_parallel_assignment.rb
|
177
175
|
- spec/support/analyzer/02_rescue_vs_respond_to.rb
|
178
176
|
- spec/support/analyzer/03_module_eval.rb
|
179
177
|
- spec/support/analyzer/06_shuffle_first_vs_sample.rb
|
@@ -252,7 +250,6 @@ signing_key:
|
|
252
250
|
specification_version: 4
|
253
251
|
summary: Run Ruby more than fast. Fasterer
|
254
252
|
test_files:
|
255
|
-
- spec/lib/fasterer/analyzer/01_parallel_assignment_spec.rb
|
256
253
|
- spec/lib/fasterer/analyzer/02_rescue_vs_respond_to_spec.rb
|
257
254
|
- spec/lib/fasterer/analyzer/03_module_eval_spec.rb
|
258
255
|
- spec/lib/fasterer/analyzer/06_shuffle_first_vs_sample_spec.rb
|
@@ -280,7 +277,6 @@ test_files:
|
|
280
277
|
- spec/lib/fasterer/method_definition_spec.rb
|
281
278
|
- spec/lib/fasterer/rescue_call_spec.rb
|
282
279
|
- spec/spec_helper.rb
|
283
|
-
- spec/support/analyzer/01_parallel_assignment.rb
|
284
280
|
- spec/support/analyzer/02_rescue_vs_respond_to.rb
|
285
281
|
- spec/support/analyzer/03_module_eval.rb
|
286
282
|
- spec/support/analyzer/06_shuffle_first_vs_sample.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Fasterer::Analyzer do
|
4
|
-
let(:test_file_path) { RSpec.root.join('support', 'analyzer', '01_parallel_assignment.rb') }
|
5
|
-
|
6
|
-
it 'should detect parallel assignment 2 times' do
|
7
|
-
analyzer = Fasterer::Analyzer.new(test_file_path)
|
8
|
-
analyzer.scan
|
9
|
-
expect(analyzer.errors[:parallel_assignment].count).to eq(2)
|
10
|
-
end
|
11
|
-
end
|