gherkin_lint 0.0.6 → 0.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gherkin_lint.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd46d129364c0d6b191ae887b28f4aca3cf54970
4
- data.tar.gz: a32133a75b81bcb3798f16f9376091c94a758c4c
3
+ metadata.gz: e9e8a5aaa0c37236e2c5570757cbd5aeb5436fb0
4
+ data.tar.gz: 5eb318102e3fbafc07e20be4df639b44a9a93d6b
5
5
  SHA512:
6
- metadata.gz: 67a8b6b040fde3bf06a07b675fcb5fd0c19e6710aaa8ceafb50f40581f4d769a7527c246f23132bbaa65cdd92cf3e10b7615e61e6704025acd88d21c56313b2e
7
- data.tar.gz: 6a3a4540b04cbc0478cb17ebb43abea75eda2fd8ccaee3af0c07b7f2e69d4a8cd1e54b379fa06fd790951857cddadcd95791c4da13b3000b6b0c6c5b0b9ca032
6
+ metadata.gz: 0eaca00ca42656f88f8a62b4a60a3d2f7b1155c1803ee59dfeaa6b0d9d6f63d508e2fac3ff970b54c4a0ce22ef73a69dc8c44365e6a265c1ab57c772a822eb1a
7
+ data.tar.gz: 154f3faf5dad974270909cfe7971044543f9ba25d0e1ab44a6ad42a7c58e658ca1a41576e4ad57c82c47910f3aa9a3966b23416e224fd9864075f2628f2a0984
data/lib/gherkin_lint.rb CHANGED
@@ -528,6 +528,7 @@ class GherkinLint
528
528
  tags = gather_same_tags feature
529
529
  next if tags.nil?
530
530
  next if tags.length < 1
531
+ next unless feature['elements'].length > 1
531
532
  references = [reference(file, feature)]
532
533
  tags.each do |tag|
533
534
  add_issue(references, "Tag '#{tag}' should be used at Feature level")
@@ -540,7 +541,7 @@ class GherkinLint
540
541
  return result unless feature.include? 'elements'
541
542
  feature['elements'].each do |scenario|
542
543
  next if scenario['keyword'] == 'Background'
543
- next unless scenario.include? 'tags'
544
+ return nil unless scenario.include? 'tags'
544
545
  tags = scenario['tags'].map { |tag| tag['name'] }
545
546
  result = tags if result.nil?
546
547
  result &= tags
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Rohe