lint_trap 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lint_trap/command.rb +2 -2
- data/lib/lint_trap/language/base.rb +5 -5
- data/lib/lint_trap/language/coffeescript.rb +1 -1
- data/lib/lint_trap/language/cpp.rb +2 -2
- data/lib/lint_trap/language/css.rb +1 -1
- data/lib/lint_trap/language/go.rb +1 -1
- data/lib/lint_trap/language/java.rb +1 -1
- data/lib/lint_trap/language/javascript.rb +1 -1
- data/lib/lint_trap/language/json.rb +1 -1
- data/lib/lint_trap/language/python.rb +1 -1
- data/lib/lint_trap/language/ruby.rb +1 -1
- data/lib/lint_trap/language/scss.rb +1 -1
- data/lib/lint_trap/language.rb +3 -2
- data/lib/lint_trap/linter/base.rb +8 -11
- data/lib/lint_trap/linter.rb +4 -2
- data/lib/lint_trap/version.rb +1 -1
- data/spec/command_spec.rb +8 -21
- data/spec/integration/checkstyle_spec.rb +6 -15
- data/spec/integration/coffeelint_spec.rb +6 -15
- data/spec/integration/cppcheck_spec.rb +6 -15
- data/spec/integration/csslint_spec.rb +6 -15
- data/spec/integration/golint_spec.rb +6 -15
- data/spec/integration/jshint_spec.rb +6 -15
- data/spec/integration/jsonlint_spec.rb +6 -15
- data/spec/integration/pylint_spec.rb +6 -15
- data/spec/integration/rubocop_spec.rb +6 -15
- data/spec/integration/scsslint_spec.rb +6 -15
- data/spec/language/coffeescript_spec.rb +1 -1
- data/spec/language/cpp_spec.rb +1 -1
- data/spec/language/css_spec.rb +1 -1
- data/spec/language/go_spec.rb +1 -1
- data/spec/language/java_spec.rb +1 -1
- data/spec/language/javascript_spec.rb +1 -1
- data/spec/language/json_spec.rb +1 -1
- data/spec/language/python_spec.rb +1 -1
- data/spec/language/ruby_spec.rb +1 -1
- data/spec/language/scss_spec.rb +1 -1
- data/spec/language_spec.rb +20 -20
- data/spec/linter/checkstyle_spec.rb +6 -6
- data/spec/linter/coffeelint_spec.rb +5 -5
- data/spec/linter/cppcheck_spec.rb +3 -3
- data/spec/linter/csslint_spec.rb +5 -5
- data/spec/linter/golint_spec.rb +3 -3
- data/spec/linter/jshint_spec.rb +6 -6
- data/spec/linter/jsonlint_spec.rb +3 -3
- data/spec/linter/pylint_spec.rb +6 -6
- data/spec/linter/rubocop_spec.rb +6 -6
- data/spec/linter/scsslint_spec.rb +5 -5
- data/spec/linter_spec.rb +16 -10
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
data/spec/linter_spec.rb
CHANGED
@@ -7,61 +7,67 @@ describe LintTrap::Linter do
|
|
7
7
|
context 'when given CheckStyle' do
|
8
8
|
let(:linter_name){'CheckStyle'}
|
9
9
|
|
10
|
-
it{is_expected.to
|
10
|
+
it{is_expected.to be_a(described_class::CheckStyle)}
|
11
11
|
end
|
12
12
|
|
13
13
|
context 'when given CoffeeLint' do
|
14
14
|
let(:linter_name){'CoffeeLint'}
|
15
15
|
|
16
|
-
it{is_expected.to
|
16
|
+
it{is_expected.to be_a(described_class::CoffeeLint)}
|
17
17
|
end
|
18
18
|
|
19
19
|
context 'when given CPPCheck' do
|
20
20
|
let(:linter_name){'CPPCheck'}
|
21
21
|
|
22
|
-
it{is_expected.to
|
22
|
+
it{is_expected.to be_a(described_class::CPPCheck)}
|
23
23
|
end
|
24
24
|
|
25
25
|
context 'when given CSSLint' do
|
26
26
|
let(:linter_name){'CSSLint'}
|
27
27
|
|
28
|
-
it{is_expected.to
|
28
|
+
it{is_expected.to be_a(described_class::CSSLint)}
|
29
29
|
end
|
30
30
|
|
31
31
|
context 'when given GoLint' do
|
32
32
|
let(:linter_name){'GoLint'}
|
33
33
|
|
34
|
-
it{is_expected.to
|
34
|
+
it{is_expected.to be_a(described_class::GoLint)}
|
35
35
|
end
|
36
36
|
|
37
37
|
context 'when given JSHint' do
|
38
38
|
let(:linter_name){'JSHint'}
|
39
39
|
|
40
|
-
it{is_expected.to
|
40
|
+
it{is_expected.to be_a(described_class::JSHint)}
|
41
41
|
end
|
42
42
|
|
43
43
|
context 'when given JSONLint' do
|
44
44
|
let(:linter_name){'JSONLint'}
|
45
45
|
|
46
|
-
it{is_expected.to
|
46
|
+
it{is_expected.to be_a(described_class::JSONLint)}
|
47
47
|
end
|
48
48
|
|
49
49
|
context 'when given PyLint' do
|
50
50
|
let(:linter_name){'PyLint'}
|
51
51
|
|
52
|
-
it{is_expected.to
|
52
|
+
it{is_expected.to be_a(described_class::PyLint)}
|
53
53
|
end
|
54
54
|
|
55
55
|
context 'when given RuboCop' do
|
56
56
|
let(:linter_name){'RuboCop'}
|
57
57
|
|
58
|
-
it{is_expected.to
|
58
|
+
it{is_expected.to be_a(described_class::RuboCop)}
|
59
59
|
end
|
60
60
|
|
61
61
|
context 'when given SCSSLint' do
|
62
62
|
let(:linter_name){'SCSSLint'}
|
63
63
|
|
64
|
-
it{is_expected.to
|
64
|
+
it{is_expected.to be_a(described_class::SCSSLint)}
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'when given an invalid linter' do
|
68
|
+
let(:linter_name){'taco cheese'}
|
69
|
+
|
70
|
+
it{is_expected.to eq(nil)}
|
65
71
|
end
|
66
72
|
end
|
67
73
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lint_trap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Madsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|