burtlo / yard-cucumber

YARD extension that adds Cucumber Features, Tags, and Step Definitions
MIT License
128 stars 46 forks source link

unexpected tIVAR, expecting end-of-input on Linux #69

Open tomatobrown opened 8 years ago

tomatobrown commented 8 years ago

Relates to: https://github.com/burtlo/yard-cucumber/issues/65

OS: Linux Ruby 2.2.1... yard (0.8.7.6) yard-cucumber (3.0.0) cucumber (2.3.3) cucumber-core (1.4.0, 1.3.0) gherkin (3.2.0) gherkin3 (3.1.2)

I've copied a piece of an example scenario:

# Comments that appear before the feature are associated with the feature
@scenarios
Feature: Displaying Scenarios
As a reader of the documentation I expect that scenario are documented correctly

# Comments after the feature description belong to the background or first scenario
Background:
Given this background step

@first @bvt
Scenario: No Step Scenario

@second @bvt
Scenario: Scenario With Steps
Given this first step
When this second step
Then this third step

And I created a rakefile with: require 'yard'

YARD::Rake::YardocTask.new do |t| t.files = ['features/**/feature1.feature'] end

My output is: rake yard

An error returns for each feature file like:

[warn]: Syntax error in `features/feature1.feature`:(1,20): syntax error, unexpected tivar, expecting end-of-input
[warn]: ParserSyntaxError: syntax error in `features/feature1.feature`:(1,20): syntax error, unexpected tIVAR, expecting end-of-input
[warn]: Stack trace:
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:545:in `on_parse_error'
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:15:in `parse'
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:439:in `parse'
        /home/tmader-brown/.rvm/gems/ruby-2.2.1/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:44:in `block in parse'

Files:          30
Modules:        23 (    9 undocumented)
Classes:         4 (    0 undocumented)
Constants:       1 (    0 undocumented)
Methods:       276 (   79 undocumented)

For what it's worth all of this works correctly on a windows machine