cucumber_lint 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +48 -30
- data/README.md +41 -24
- data/Rakefile +1 -1
- data/circle.yml +3 -0
- data/config/default.yml +27 -0
- data/cucumber_lint.gemspec +4 -4
- data/features/cucumber_lint/consistent_empty_lines/between_description_and_scenario.feature +39 -0
- data/features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_docstring.feature +47 -0
- data/features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_examples.feature +49 -0
- data/features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_step.feature +41 -0
- data/features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_table.feature +43 -0
- data/features/cucumber_lint/consistent_empty_lines/between_feature_and_description.feature +33 -0
- data/features/cucumber_lint/consistent_empty_lines/between_feature_and_scenario.feature +33 -0
- data/features/cucumber_lint/consistent_table_headers/examples_table.feature +74 -0
- data/features/cucumber_lint/consistent_table_headers/step_table.feature +64 -0
- data/features/cucumber_lint/consistent_table_headers/unsupported_style.feature +20 -0
- data/features/cucumber_lint/consistent_table_whitespace/examples_table.feature +46 -0
- data/features/cucumber_lint/consistent_table_whitespace/step_table.feature +42 -0
- data/features/cucumber_lint/no_empty_features.feature +20 -0
- data/features/cucumber_lint/no_files.feature +6 -0
- data/features/cucumber_lint/no_repeating_keywords.feature +44 -0
- data/features/cucumber_lint/unsupported_options.feature +11 -0
- data/features/step_definitions/cli_steps.rb +47 -10
- data/features/step_definitions/env.rb +5 -9
- data/features/step_definitions/fixtures/config/disabled.yml +18 -0
- data/features/step_definitions/support/file_helpers.rb +20 -0
- data/lib/core_ext/array.rb +8 -0
- data/lib/core_ext/basic_object.rb +8 -0
- data/lib/core_ext/hash.rb +3 -18
- data/lib/core_ext/string.rb +7 -0
- data/lib/cucumber_lint/cli.rb +60 -31
- data/lib/cucumber_lint/config.rb +55 -0
- data/lib/cucumber_lint/errors/unsupported_style.rb +10 -0
- data/lib/cucumber_lint/linted_file.rb +77 -0
- data/lib/cucumber_lint/linter/feature_empty_lines_linter.rb +125 -0
- data/lib/cucumber_lint/linter/feature_linter.rb +33 -30
- data/lib/cucumber_lint/linter/scenario_outline_linter.rb +17 -8
- data/lib/cucumber_lint/linter/steps_linter.rb +9 -8
- data/lib/cucumber_lint/linter/table_linter.rb +26 -15
- data/lib/cucumber_lint/linter.rb +10 -10
- data/lib/cucumber_lint/version.rb +1 -1
- data/lib/cucumber_lint.rb +4 -1
- metadata +35 -36
- data/.travis.yml +0 -9
- data/features/cucumber_lint/fix/nothing.feature +0 -12
- data/features/cucumber_lint/fix/repeating_steps.feature +0 -25
- data/features/cucumber_lint/fix/table_whitespace.feature +0 -25
- data/features/cucumber_lint/fix/uppercase_table_headers.feature +0 -25
- data/features/cucumber_lint/lint/nothing.feature +0 -12
- data/features/cucumber_lint/lint/repeating_steps.feature +0 -31
- data/features/cucumber_lint/lint/table_whitespace.feature +0 -27
- data/features/cucumber_lint/lint/uppercase_table_headers.feature +0 -30
- data/features/step_definitions/feature_formatter_steps.rb +0 -15
- data/features/step_definitions/fixtures/repeating_steps/bad.feature.example +0 -12
- data/features/step_definitions/fixtures/repeating_steps/good.feature.example +0 -12
- data/features/step_definitions/fixtures/table_whitespace/bad.feature.example +0 -20
- data/features/step_definitions/fixtures/table_whitespace/good.feature.example +0 -20
- data/features/step_definitions/fixtures/uppercase_table_headers/bad.feature.example +0 -20
- data/features/step_definitions/fixtures/uppercase_table_headers/good.feature.example +0 -20
- data/lib/cucumber_lint/fix_list.rb +0 -37
@@ -0,0 +1,77 @@
|
|
1
|
+
module CucumberLint
|
2
|
+
# A class that represents a file being linted
|
3
|
+
class LintedFile
|
4
|
+
|
5
|
+
attr_reader :content, :errors, :lines
|
6
|
+
|
7
|
+
def initialize path
|
8
|
+
@path = Pathname.new path
|
9
|
+
@content = IO.read path
|
10
|
+
@lines = @content.lines
|
11
|
+
|
12
|
+
@errors = []
|
13
|
+
@fixes = {}
|
14
|
+
@marked_for_deletion = false
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def add_error error
|
19
|
+
@errors << "#{@path}:#{error}"
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def add_fix line_number, fix
|
24
|
+
@fixes[line_number] ||= []
|
25
|
+
@fixes[line_number] += Array(fix)
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
def mark_for_deletion
|
30
|
+
@marked_for_deletion = true
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
def resolve
|
35
|
+
if @marked_for_deletion
|
36
|
+
delete
|
37
|
+
:deleted
|
38
|
+
elsif !errors.empty? || fixable?
|
39
|
+
fix
|
40
|
+
errors.empty? ? :written : :failed
|
41
|
+
else
|
42
|
+
:passed
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
|
50
|
+
def apply_fixes
|
51
|
+
lines.each_with_index.map do |line, index|
|
52
|
+
line_number = index + 1
|
53
|
+
|
54
|
+
@fixes.fetch(line_number, []).each do |fix|
|
55
|
+
line = fix.call(line)
|
56
|
+
end
|
57
|
+
|
58
|
+
line
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
def delete
|
64
|
+
@path.delete
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
def fix
|
69
|
+
IO.write @path, apply_fixes.join
|
70
|
+
end
|
71
|
+
|
72
|
+
def fixable?
|
73
|
+
!@fixes.empty?
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
module CucumberLint
|
2
|
+
# A linter for a given feature's empty lines
|
3
|
+
class FeatureEmptyLinesLinter < Linter
|
4
|
+
|
5
|
+
def initialize config:, feature:, linted_file:
|
6
|
+
super config: config, linted_file: linted_file
|
7
|
+
|
8
|
+
@feature = feature
|
9
|
+
@description = feature.description
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
def lint
|
14
|
+
lint_description
|
15
|
+
lint_elements
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
|
22
|
+
def expected_first_element_start
|
23
|
+
spacing = if @description == ''
|
24
|
+
get_config(:between_feature_and_element)
|
25
|
+
else
|
26
|
+
get_config(:between_feature_and_description) +
|
27
|
+
@description.count("\n") +
|
28
|
+
get_config(:between_description_and_element) +
|
29
|
+
1
|
30
|
+
end
|
31
|
+
|
32
|
+
@feature.line + spacing + 1
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
def extra_empty_line line_number, count
|
37
|
+
if @config.fix
|
38
|
+
count.times do |i|
|
39
|
+
add_fix line_number + i, -> (line) { line.sub("\n", '') }
|
40
|
+
end
|
41
|
+
else
|
42
|
+
add_error "#{line_number}: Remove#{" #{count}" if count > 1} empty line#{'s' if count > 1}"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
def get_config key
|
48
|
+
@config.consistent_empty_lines.send(key)
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
def get_element_end element
|
53
|
+
if element.type == 'scenario_outline'
|
54
|
+
element.examples.last.rows.last.line
|
55
|
+
else
|
56
|
+
step_end element.steps.last
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
def lint_description
|
62
|
+
return if @description == ''
|
63
|
+
|
64
|
+
shared_lines = @feature.line + 1
|
65
|
+
expected_start = shared_lines + get_config(:between_feature_and_description)
|
66
|
+
actual_start = shared_lines + @description.match(/\n*/)[0].length
|
67
|
+
resolve_empty_line_difference actual_start, expected_start
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
def lint_elements
|
72
|
+
return unless @feature.elements
|
73
|
+
|
74
|
+
expected_element_start = expected_first_element_start
|
75
|
+
@feature.elements.each do |element|
|
76
|
+
resolve_empty_line_difference element.line, expected_element_start
|
77
|
+
lint_scenario_outline_and_examples element if element.type == 'scenario_outline'
|
78
|
+
element_end = get_element_end element
|
79
|
+
expected_element_start = element_end + get_config(:between_elements) + 1
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
def lint_scenario_outline_and_examples element
|
85
|
+
expected_start = step_end(element.steps.last) +
|
86
|
+
get_config(:between_scenario_outline_and_examples) +
|
87
|
+
1
|
88
|
+
actual_start = element.examples.first.line
|
89
|
+
resolve_empty_line_difference actual_start, expected_start
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
def missing_empty_line line_number, count
|
94
|
+
if @config.fix
|
95
|
+
add_fix line_number, -> (line) { "\n" * count + line }
|
96
|
+
else
|
97
|
+
add_error "#{line_number}: Add#{" #{count}" if count > 1} empty line#{'s' if count > 1}"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
def resolve_empty_line_difference actual, expected
|
103
|
+
if actual < expected
|
104
|
+
missing_empty_line actual, expected - actual
|
105
|
+
elsif actual > expected
|
106
|
+
extra_empty_line expected, actual - expected
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
def step_end step
|
112
|
+
rows = step.rows
|
113
|
+
doc_string = step.doc_string
|
114
|
+
|
115
|
+
if rows && rows.is_a?(Array)
|
116
|
+
rows.last.line
|
117
|
+
elsif doc_string
|
118
|
+
doc_string.line + doc_string.value.count("\n") + 2
|
119
|
+
else
|
120
|
+
step.line
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'core_ext/array'
|
2
|
+
require 'core_ext/basic_object'
|
1
3
|
require 'core_ext/hash'
|
2
4
|
require 'gherkin/formatter/json_formatter'
|
3
5
|
require 'gherkin/parser/parser'
|
@@ -7,29 +9,38 @@ module CucumberLint
|
|
7
9
|
# A linter for a given feature (represented by a filename)
|
8
10
|
class FeatureLinter < Linter
|
9
11
|
|
10
|
-
|
12
|
+
def lint
|
13
|
+
features = parse_content
|
11
14
|
|
12
|
-
|
13
|
-
|
15
|
+
features.each do |feature|
|
16
|
+
lint_feature_empty_lines feature if @config.consistent_empty_lines.enabled
|
17
|
+
lint_elements feature
|
18
|
+
end
|
14
19
|
|
15
|
-
|
16
|
-
@content = IO.read(path)
|
17
|
-
@file_lines = @content.lines
|
20
|
+
empty_feature if features.count == 0
|
18
21
|
end
|
19
22
|
|
23
|
+
private
|
24
|
+
|
20
25
|
|
21
|
-
def
|
22
|
-
|
26
|
+
def empty_feature
|
27
|
+
return unless @config.no_empty_features.enabled
|
28
|
+
|
29
|
+
if @config.fix
|
30
|
+
@linted_file.mark_for_deletion
|
31
|
+
else
|
32
|
+
add_error ' Remove file with no feature'
|
33
|
+
end
|
23
34
|
end
|
24
35
|
|
25
36
|
|
26
|
-
def
|
27
|
-
|
37
|
+
def lint_examples examples
|
38
|
+
examples.each { |example| lint_table example.rows }
|
28
39
|
end
|
29
40
|
|
30
41
|
|
31
|
-
def
|
32
|
-
|
42
|
+
def lint_elements feature
|
43
|
+
return unless feature.elements
|
33
44
|
|
34
45
|
feature.elements.each do |element|
|
35
46
|
lint_steps element.steps
|
@@ -39,25 +50,12 @@ module CucumberLint
|
|
39
50
|
lint_examples element.examples
|
40
51
|
end
|
41
52
|
end
|
42
|
-
|
43
|
-
errors.map! { |error| "#{feature.uri}:#{error}" }
|
44
53
|
end
|
45
54
|
|
46
|
-
def write
|
47
|
-
fixed_content = fix_list.apply(@file_lines).join
|
48
|
-
IO.write(@path, fixed_content)
|
49
|
-
end
|
50
|
-
|
51
|
-
private
|
52
55
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
|
59
|
-
def lint_examples examples
|
60
|
-
examples.each { |example| lint_table example.rows }
|
56
|
+
def lint_feature_empty_lines feature
|
57
|
+
linter = FeatureEmptyLinesLinter.new linter_options.merge(feature: feature)
|
58
|
+
linter.lint
|
61
59
|
end
|
62
60
|
|
63
61
|
|
@@ -79,13 +77,18 @@ module CucumberLint
|
|
79
77
|
end
|
80
78
|
|
81
79
|
|
80
|
+
def linter_options
|
81
|
+
{ config: @config, linted_file: @linted_file }
|
82
|
+
end
|
83
|
+
|
84
|
+
|
82
85
|
def parse_content
|
83
86
|
io = StringIO.new
|
84
87
|
formatter = Gherkin::Formatter::JSONFormatter.new(io)
|
85
88
|
parser = Gherkin::Parser::Parser.new(formatter)
|
86
|
-
parser.parse(@content,
|
89
|
+
parser.parse(@linted_file.content, '', 0)
|
87
90
|
formatter.done
|
88
|
-
MultiJson.load(io.string)
|
91
|
+
MultiJson.load(io.string).to_open_struct
|
89
92
|
end
|
90
93
|
|
91
94
|
end
|
@@ -1,19 +1,21 @@
|
|
1
|
+
require 'core_ext/string'
|
2
|
+
|
1
3
|
module CucumberLint
|
2
4
|
# A linter for a series of steps in a scenario outline (as parsed by Gherkin)
|
3
5
|
class ScenarioOutlineLinter < Linter
|
4
6
|
|
5
|
-
def initialize steps:,
|
6
|
-
super
|
7
|
+
def initialize steps:, config:, linted_file:
|
8
|
+
super config: config, linted_file: linted_file
|
7
9
|
|
8
10
|
@steps = steps
|
9
|
-
@
|
11
|
+
@header_style = @config.consistent_table_headers.enforced_style.to_sym
|
10
12
|
end
|
11
13
|
|
12
14
|
|
13
15
|
def lint
|
14
16
|
@steps.each do |step|
|
15
17
|
step.name.scan(/<.+?>/).each do |placeholder|
|
16
|
-
|
18
|
+
inconsistent_placeholder step.line, placeholder if bad_placeholder? placeholder
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -22,11 +24,18 @@ module CucumberLint
|
|
22
24
|
private
|
23
25
|
|
24
26
|
|
25
|
-
def bad_placeholder
|
26
|
-
|
27
|
-
|
27
|
+
def bad_placeholder? str
|
28
|
+
str != str.public_send(@header_style)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
def inconsistent_placeholder line_number, str
|
33
|
+
return unless @config.consistent_table_headers.enabled
|
34
|
+
|
35
|
+
if @config.fix
|
36
|
+
add_fix line_number, -> (line) { line.sub(str, str.public_send(@header_style)) }
|
28
37
|
else
|
29
|
-
|
38
|
+
add_error "#{line_number}: #{@header_style} \"#{str}\""
|
30
39
|
end
|
31
40
|
end
|
32
41
|
|
@@ -2,11 +2,10 @@ module CucumberLint
|
|
2
2
|
# A linter for a series of steps (as parsed by Gherkin)
|
3
3
|
class StepsLinter < Linter
|
4
4
|
|
5
|
-
def initialize steps:,
|
6
|
-
super
|
5
|
+
def initialize steps:, config:, linted_file:
|
6
|
+
super config: config, linted_file: linted_file
|
7
7
|
|
8
8
|
@steps = steps
|
9
|
-
@file_lines = file_lines
|
10
9
|
end
|
11
10
|
|
12
11
|
|
@@ -32,17 +31,19 @@ module CucumberLint
|
|
32
31
|
STEP_TYPES = %w(Given When Then)
|
33
32
|
|
34
33
|
def repeated_keyword line_number, keyword
|
35
|
-
|
36
|
-
|
34
|
+
return unless @config.no_repeating_keywords.enabled
|
35
|
+
|
36
|
+
if @config.fix
|
37
|
+
add_fix line_number, -> (line) { line.sub(keyword, 'And') }
|
37
38
|
else
|
38
|
-
|
39
|
+
add_error "#{line_number}: Use \"And\" instead of repeating \"#{keyword}\""
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
42
43
|
|
43
44
|
def lint_table rows
|
44
|
-
|
45
|
-
|
45
|
+
linter = TableLinter.new rows: rows, config: @config, linted_file: @linted_file
|
46
|
+
linter.lint
|
46
47
|
end
|
47
48
|
|
48
49
|
end
|
@@ -1,53 +1,64 @@
|
|
1
|
+
require 'core_ext/string'
|
1
2
|
require 'gherkin/formatter/pretty_formatter'
|
2
3
|
|
3
4
|
module CucumberLint
|
4
5
|
# A linter for a series of table rows (as parsed by Gherkin)
|
5
6
|
class TableLinter < Linter
|
6
7
|
|
7
|
-
def initialize rows:,
|
8
|
-
super
|
8
|
+
def initialize rows:, config:, linted_file:
|
9
|
+
super config: config, linted_file: linted_file
|
9
10
|
|
10
11
|
@rows = rows
|
11
|
-
@
|
12
|
+
@header_style = @config.consistent_table_headers.enforced_style.to_sym
|
12
13
|
end
|
13
14
|
|
14
15
|
|
15
16
|
def lint
|
16
|
-
|
17
|
-
|
17
|
+
inconsistent_table_whitespace unless actual_table_lines == expected_table_lines
|
18
|
+
inconsistent_table_headers if inconsistent_table_headers?
|
18
19
|
end
|
19
20
|
|
20
21
|
|
21
22
|
private
|
22
23
|
|
23
24
|
|
24
|
-
def
|
25
|
-
|
26
|
-
|
25
|
+
def inconsistent_table_headers
|
26
|
+
return unless @config.consistent_table_headers.enabled
|
27
|
+
|
28
|
+
if @config.fix
|
29
|
+
add_fix @rows[0].line, -> (line) { line.split('|', -1).map(&@header_style).join('|') }
|
27
30
|
else
|
28
|
-
|
31
|
+
add_error "#{@rows[0].line}: #{@header_style} table headers"
|
29
32
|
end
|
30
33
|
end
|
31
34
|
|
32
35
|
|
36
|
+
def inconsistent_table_headers?
|
37
|
+
headers = actual_table_lines[0].split('|')
|
38
|
+
headers != headers.map(&@header_style)
|
39
|
+
end
|
40
|
+
|
41
|
+
|
33
42
|
def actual_table_lines
|
34
43
|
@actual_table_lines ||= determine_actual_table_lines
|
35
44
|
end
|
36
45
|
|
37
46
|
|
38
|
-
def
|
39
|
-
|
47
|
+
def inconsistent_table_whitespace
|
48
|
+
return unless @config.consistent_table_whitespace.enabled
|
49
|
+
|
50
|
+
if @config.fix
|
40
51
|
@rows.each_with_index.map do |row, index|
|
41
|
-
|
52
|
+
add_fix row.line, -> (line) { line.gsub(/\|.*\|/, expected_table_lines[index]) }
|
42
53
|
end
|
43
54
|
else
|
44
|
-
|
55
|
+
add_error "#{@rows[0].line}: Fix table whitespace"
|
45
56
|
end
|
46
57
|
end
|
47
58
|
|
48
59
|
|
49
60
|
def determine_actual_table_lines
|
50
|
-
@rows.map { |row| @
|
61
|
+
@rows.map { |row| @linted_file.lines[row.line - 1].strip }
|
51
62
|
end
|
52
63
|
|
53
64
|
|
@@ -58,7 +69,7 @@ module CucumberLint
|
|
58
69
|
formatter = Gherkin::Formatter::PrettyFormatter.new(io, false, false)
|
59
70
|
formatter.table(@rows)
|
60
71
|
formatter.done
|
61
|
-
io.string.lines.map(&:
|
72
|
+
io.string.lines.map(&:strip)
|
62
73
|
end
|
63
74
|
|
64
75
|
|
data/lib/cucumber_lint/linter.rb
CHANGED
@@ -2,19 +2,19 @@ module CucumberLint
|
|
2
2
|
# A base linter, not meant to be instantiated
|
3
3
|
class Linter
|
4
4
|
|
5
|
-
|
5
|
+
def initialize config:, linted_file:
|
6
|
+
@config = config
|
7
|
+
@linted_file = linted_file
|
8
|
+
end
|
9
|
+
|
6
10
|
|
11
|
+
def add_error *args
|
12
|
+
@linted_file.add_error(*args)
|
13
|
+
end
|
7
14
|
|
8
|
-
def initialize fix:, parent: nil
|
9
|
-
@fix = fix
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
@fix_list = parent.fix_list
|
14
|
-
else
|
15
|
-
@errors = []
|
16
|
-
@fix_list = FixList.new
|
17
|
-
end
|
16
|
+
def add_fix *args
|
17
|
+
@linted_file.add_fix(*args)
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
data/lib/cucumber_lint.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'cucumber_lint/cli'
|
2
|
-
require 'cucumber_lint/
|
2
|
+
require 'cucumber_lint/config'
|
3
|
+
require 'cucumber_lint/errors/unsupported_style'
|
4
|
+
require 'cucumber_lint/linted_file'
|
3
5
|
require 'cucumber_lint/linter'
|
6
|
+
require 'cucumber_lint/linter/feature_empty_lines_linter'
|
4
7
|
require 'cucumber_lint/linter/feature_linter'
|
5
8
|
require 'cucumber_lint/linter/scenario_outline_linter'
|
6
9
|
require 'cucumber_lint/linter/steps_linter'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- charlierudolph
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.7.
|
19
|
+
version: 0.7.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.7.
|
26
|
+
version: 0.7.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gherkin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.12.2
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 2.12.2
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,29 +38,20 @@ dependencies:
|
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: 2.12.2
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 2.12.2
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: multi_json
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.10.1
|
47
|
+
version: 1.11.2
|
57
48
|
type: :runtime
|
58
49
|
prerelease: false
|
59
50
|
version_requirements: !ruby/object:Gem::Requirement
|
60
51
|
requirements:
|
61
52
|
- - "~>"
|
62
53
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 1.10.1
|
54
|
+
version: 1.11.2
|
67
55
|
description:
|
68
56
|
email:
|
69
57
|
- charles.w.rudolph@gmail.com
|
@@ -74,38 +62,49 @@ extra_rdoc_files: []
|
|
74
62
|
files:
|
75
63
|
- ".gitignore"
|
76
64
|
- ".rubocop.yml"
|
77
|
-
- ".
|
65
|
+
- ".ruby-version"
|
78
66
|
- Gemfile
|
79
67
|
- Gemfile.lock
|
80
68
|
- LICENSE
|
81
69
|
- README.md
|
82
70
|
- Rakefile
|
83
71
|
- bin/cucumber_lint
|
72
|
+
- circle.yml
|
73
|
+
- config/default.yml
|
84
74
|
- cucumber.yml
|
85
75
|
- cucumber_lint.gemspec
|
86
|
-
- features/cucumber_lint/
|
87
|
-
- features/cucumber_lint/
|
88
|
-
- features/cucumber_lint/
|
89
|
-
- features/cucumber_lint/
|
90
|
-
- features/cucumber_lint/
|
91
|
-
- features/cucumber_lint/
|
92
|
-
- features/cucumber_lint/
|
93
|
-
- features/cucumber_lint/
|
76
|
+
- features/cucumber_lint/consistent_empty_lines/between_description_and_scenario.feature
|
77
|
+
- features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_docstring.feature
|
78
|
+
- features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_examples.feature
|
79
|
+
- features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_step.feature
|
80
|
+
- features/cucumber_lint/consistent_empty_lines/between_elements/ending_with_table.feature
|
81
|
+
- features/cucumber_lint/consistent_empty_lines/between_feature_and_description.feature
|
82
|
+
- features/cucumber_lint/consistent_empty_lines/between_feature_and_scenario.feature
|
83
|
+
- features/cucumber_lint/consistent_table_headers/examples_table.feature
|
84
|
+
- features/cucumber_lint/consistent_table_headers/step_table.feature
|
85
|
+
- features/cucumber_lint/consistent_table_headers/unsupported_style.feature
|
86
|
+
- features/cucumber_lint/consistent_table_whitespace/examples_table.feature
|
87
|
+
- features/cucumber_lint/consistent_table_whitespace/step_table.feature
|
88
|
+
- features/cucumber_lint/no_empty_features.feature
|
89
|
+
- features/cucumber_lint/no_files.feature
|
90
|
+
- features/cucumber_lint/no_repeating_keywords.feature
|
91
|
+
- features/cucumber_lint/unsupported_options.feature
|
94
92
|
- features/step_definitions/cli_steps.rb
|
95
93
|
- features/step_definitions/env.rb
|
96
|
-
- features/step_definitions/
|
97
|
-
- features/step_definitions/
|
98
|
-
- features/step_definitions/fixtures/repeating_steps/good.feature.example
|
99
|
-
- features/step_definitions/fixtures/table_whitespace/bad.feature.example
|
100
|
-
- features/step_definitions/fixtures/table_whitespace/good.feature.example
|
101
|
-
- features/step_definitions/fixtures/uppercase_table_headers/bad.feature.example
|
102
|
-
- features/step_definitions/fixtures/uppercase_table_headers/good.feature.example
|
94
|
+
- features/step_definitions/fixtures/config/disabled.yml
|
95
|
+
- features/step_definitions/support/file_helpers.rb
|
103
96
|
- features/step_definitions/support/run_helpers.rb
|
97
|
+
- lib/core_ext/array.rb
|
98
|
+
- lib/core_ext/basic_object.rb
|
104
99
|
- lib/core_ext/hash.rb
|
100
|
+
- lib/core_ext/string.rb
|
105
101
|
- lib/cucumber_lint.rb
|
106
102
|
- lib/cucumber_lint/cli.rb
|
107
|
-
- lib/cucumber_lint/
|
103
|
+
- lib/cucumber_lint/config.rb
|
104
|
+
- lib/cucumber_lint/errors/unsupported_style.rb
|
105
|
+
- lib/cucumber_lint/linted_file.rb
|
108
106
|
- lib/cucumber_lint/linter.rb
|
107
|
+
- lib/cucumber_lint/linter/feature_empty_lines_linter.rb
|
109
108
|
- lib/cucumber_lint/linter/feature_linter.rb
|
110
109
|
- lib/cucumber_lint/linter/scenario_outline_linter.rb
|
111
110
|
- lib/cucumber_lint/linter/steps_linter.rb
|
@@ -131,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
130
|
version: '0'
|
132
131
|
requirements: []
|
133
132
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.4.
|
133
|
+
rubygems_version: 2.4.8
|
135
134
|
signing_key:
|
136
135
|
specification_version: 4
|
137
136
|
summary: A command line interface for linting and formatting cucumber features
|