chutney 3.0.0.beta.1 → 3.1.1
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/.github/dependabot.yml +16 -0
- data/.rubocop.yml +4 -3
- data/LICENSE.txt +1 -1
- data/README.md +7 -1
- data/Rakefile +6 -8
- data/chutney.gemspec +9 -6
- data/config/{chutney.yml → chutney_defaults.yml} +2 -0
- data/docs/index.md +1 -1
- data/docs/usage/rules.md +34 -64
- data/exe/chutney +21 -3
- data/lib/chutney.rb +9 -3
- data/lib/chutney/configuration.rb +7 -2
- data/lib/chutney/formatter.rb +4 -5
- data/lib/chutney/formatter/pie_formatter.rb +8 -13
- data/lib/chutney/formatter/rainbow_formatter.rb +11 -13
- data/lib/chutney/linter.rb +50 -43
- data/lib/chutney/linter/avoid_full_stop.rb +1 -3
- data/lib/chutney/linter/avoid_outline_for_single_example.rb +3 -3
- data/lib/chutney/linter/avoid_scripting.rb +2 -2
- data/lib/chutney/linter/background_does_more_than_setup.rb +3 -4
- data/lib/chutney/linter/background_requires_multiple_scenarios.rb +1 -1
- data/lib/chutney/linter/bad_scenario_name.rb +2 -2
- data/lib/chutney/linter/file_name_differs_feature_name.rb +3 -3
- data/lib/chutney/linter/givens_after_background.rb +2 -2
- data/lib/chutney/linter/invalid_file_name.rb +1 -1
- data/lib/chutney/linter/invalid_step_flow.rb +2 -2
- data/lib/chutney/linter/missing_example_name.rb +2 -4
- data/lib/chutney/linter/missing_feature_description.rb +1 -1
- data/lib/chutney/linter/missing_feature_name.rb +2 -2
- data/lib/chutney/linter/missing_scenario_name.rb +1 -2
- data/lib/chutney/linter/missing_test_action.rb +1 -1
- data/lib/chutney/linter/missing_verification.rb +1 -1
- data/lib/chutney/linter/required_tags_starts_with.rb +5 -6
- data/lib/chutney/linter/same_tag_different_case.rb +37 -0
- data/lib/chutney/linter/same_tag_for_all_scenarios.rb +9 -9
- data/lib/chutney/linter/scenario_names_match.rb +2 -3
- data/lib/chutney/linter/tag_used_multiple_times.rb +1 -1
- data/lib/chutney/linter/too_clumsy.rb +1 -1
- data/lib/chutney/linter/too_long_step.rb +3 -3
- data/lib/chutney/linter/too_many_different_tags.rb +6 -6
- data/lib/chutney/linter/too_many_steps.rb +3 -3
- data/lib/chutney/linter/too_many_tags.rb +3 -3
- data/lib/chutney/linter/unique_scenario_names.rb +2 -2
- data/lib/chutney/linter/unknown_variable.rb +3 -3
- data/lib/chutney/linter/unused_variable.rb +3 -4
- data/lib/chutney/linter/use_background.rb +4 -4
- data/lib/chutney/linter/use_outline.rb +7 -7
- data/lib/chutney/version.rb +1 -1
- data/lib/config/locales/en.yml +3 -0
- data/spec/chutney_spec.rb +9 -9
- metadata +17 -33
data/lib/config/locales/en.yml
CHANGED
@@ -63,6 +63,9 @@ en:
|
|
63
63
|
scenario_names_match: >-
|
64
64
|
You have a scenario name which does not match the required format.
|
65
65
|
Allowed patterns are '%{pattern}'.
|
66
|
+
same_tag_different_case: >-
|
67
|
+
You have a tag which has already appeared as '@%{existing_tag}' which is a different case
|
68
|
+
to '@%{tag}'. Cucumber tags are case-sensitive: use a consistent case for your tag names.
|
66
69
|
same_tag_for_all_scenarios:
|
67
70
|
feature_level: >-
|
68
71
|
You are using the same tag (%{tag}) for all scenarios.
|
data/spec/chutney_spec.rb
CHANGED
@@ -8,25 +8,25 @@ describe Chutney::ChutneyLint do
|
|
8
8
|
it 'has a version number' do
|
9
9
|
expect(Chutney::VERSION).not_to be nil
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
describe '#initialize' do
|
13
13
|
it 'creates an instance' do
|
14
14
|
expect(subject).not_to be_nil
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
it 'has an empty list of files if none are given' do
|
18
18
|
expect(subject.files).to eq []
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
it 'has a list of files given on initialization' do
|
22
22
|
alt_subject = Chutney::ChutneyLint.new('a', 'b')
|
23
23
|
expect(alt_subject.files).to eq %w[a b]
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
it 'initializes a results hash' do
|
27
27
|
expect(subject.results).to eq({})
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
it 'sets the load path for I18n' do
|
31
31
|
expect(I18n.load_path).not_to eq []
|
32
32
|
end
|
@@ -36,25 +36,25 @@ describe Chutney::ChutneyLint do
|
|
36
36
|
expect(subject.configuration).not_to be_nil
|
37
37
|
expect(subject.configuration).to respond_to :[]
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
it 'allows the configuration to be set explicitly' do
|
41
41
|
config = { 'BackgroundDoesMoreThanSetup' => { 'Enabled' => true } }
|
42
42
|
subject.configuration = config
|
43
43
|
expect(subject.configuration).to be config
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
it 'controls the available linters' do
|
47
47
|
subject.configuration = {}
|
48
48
|
expect(subject.linters).to be_empty
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
it 'enables linters to be activated' do
|
52
52
|
config = { 'BackgroundDoesMoreThanSetup' => { 'Enabled' => true } }
|
53
53
|
subject.configuration = config
|
54
54
|
expect(subject.linters).to eq [Chutney::BackgroundDoesMoreThanSetup]
|
55
55
|
end
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
context 'linting' do
|
59
59
|
it 'aliases analyse and analyze' do
|
60
60
|
expect(subject).to respond_to :analyse
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chutney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nigel Brookes-Thomas
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: amatch
|
@@ -41,26 +41,6 @@ dependencies:
|
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '3.3'
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: gherkin
|
46
|
-
requirement: !ruby/object:Gem::Requirement
|
47
|
-
requirements:
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 5.1.0
|
51
|
-
- - "<"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '9.1'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 5.1.0
|
61
|
-
- - "<"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '9.1'
|
64
44
|
- !ruby/object:Gem::Dependency
|
65
45
|
name: i18n
|
66
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,14 +103,14 @@ dependencies:
|
|
123
103
|
requirements:
|
124
104
|
- - "~>"
|
125
105
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
106
|
+
version: '6.0'
|
127
107
|
type: :development
|
128
108
|
prerelease: false
|
129
109
|
version_requirements: !ruby/object:Gem::Requirement
|
130
110
|
requirements:
|
131
111
|
- - "~>"
|
132
112
|
- !ruby/object:Gem::Version
|
133
|
-
version: '
|
113
|
+
version: '6.0'
|
134
114
|
- !ruby/object:Gem::Dependency
|
135
115
|
name: pry-byebug
|
136
116
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,14 +173,14 @@ dependencies:
|
|
193
173
|
requirements:
|
194
174
|
- - "~>"
|
195
175
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
176
|
+
version: 1.14.0
|
197
177
|
type: :development
|
198
178
|
prerelease: false
|
199
179
|
version_requirements: !ruby/object:Gem::Requirement
|
200
180
|
requirements:
|
201
181
|
- - "~>"
|
202
182
|
- !ruby/object:Gem::Version
|
203
|
-
version:
|
183
|
+
version: 1.14.0
|
204
184
|
- !ruby/object:Gem::Dependency
|
205
185
|
name: rspec
|
206
186
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,8 +195,10 @@ dependencies:
|
|
215
195
|
- - "~>"
|
216
196
|
- !ruby/object:Gem::Version
|
217
197
|
version: '3.8'
|
218
|
-
description: A linter for your Cucumber features.
|
219
|
-
|
198
|
+
description: A linter for your Cucumber features. Making sure you have nice, expressible
|
199
|
+
Gherkin is essential is making sure you have a readable test-base. Chutney is designed
|
200
|
+
to sniff out smells in your feature files. It supports any spoken language Cucumber
|
201
|
+
supports.
|
220
202
|
email:
|
221
203
|
- nigel@brookes-thomas.co.uk
|
222
204
|
executables:
|
@@ -226,6 +208,7 @@ extra_rdoc_files: []
|
|
226
208
|
files:
|
227
209
|
- ".circleci/config.yml"
|
228
210
|
- ".coveralls.yml"
|
211
|
+
- ".github/dependabot.yml"
|
229
212
|
- ".gitignore"
|
230
213
|
- ".rspec"
|
231
214
|
- ".rubocop.yml"
|
@@ -235,7 +218,7 @@ files:
|
|
235
218
|
- README.md
|
236
219
|
- Rakefile
|
237
220
|
- chutney.gemspec
|
238
|
-
- config/
|
221
|
+
- config/chutney_defaults.yml
|
239
222
|
- config/cucumber.yml
|
240
223
|
- docs/.keep
|
241
224
|
- docs/_config.yml
|
@@ -280,6 +263,7 @@ files:
|
|
280
263
|
- lib/chutney/linter/missing_test_action.rb
|
281
264
|
- lib/chutney/linter/missing_verification.rb
|
282
265
|
- lib/chutney/linter/required_tags_starts_with.rb
|
266
|
+
- lib/chutney/linter/same_tag_different_case.rb
|
283
267
|
- lib/chutney/linter/same_tag_for_all_scenarios.rb
|
284
268
|
- lib/chutney/linter/scenario_names_match.rb
|
285
269
|
- lib/chutney/linter/tag_used_multiple_times.rb
|
@@ -310,16 +294,16 @@ require_paths:
|
|
310
294
|
- lib
|
311
295
|
required_ruby_version: !ruby/object:Gem::Requirement
|
312
296
|
requirements:
|
313
|
-
- - "
|
297
|
+
- - ">="
|
314
298
|
- !ruby/object:Gem::Version
|
315
299
|
version: '2.6'
|
316
300
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
301
|
requirements:
|
318
|
-
- - "
|
302
|
+
- - ">="
|
319
303
|
- !ruby/object:Gem::Version
|
320
|
-
version:
|
304
|
+
version: '0'
|
321
305
|
requirements: []
|
322
|
-
rubygems_version: 3.1.
|
306
|
+
rubygems_version: 3.1.4
|
323
307
|
signing_key:
|
324
308
|
specification_version: 4
|
325
309
|
summary: A linter for multi-lingual Gherkin
|