Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash from space_before_script.rb #18

Closed
MicahElliott opened this issue Jun 25, 2014 · 1 comment
Closed

Crash from space_before_script.rb #18

MicahElliott opened this issue Jun 25, 2014 · 1 comment
Labels

Comments

@MicahElliott
Copy link

% cat haml_lint_bug.html.haml
%p= @foo.bar
% haml-lint -i SpaceBeforeScript haml_lint_bug.html.haml
/home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/linter/space_before_script.rb:73:in `next_node': undefined method `children' for nil:NilClass (NoMethodError)
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/linter/space_before_script.rb:80:in `next_node'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/linter/space_before_script.rb:58:in `tag_with_inline_text'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/linter/space_before_script.rb:13:in `visit_tag'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/haml_visitor.rb:16:in `visit'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/haml_visitor.rb:25:in `block in visit_children'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/haml_visitor.rb:25:in `each'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/haml_visitor.rb:25:in `visit_children'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/haml_visitor.rb:21:in `visit'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/linter.rb:13:in `run'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:39:in `block in find_lints'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:38:in `each'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:38:in `find_lints'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:27:in `block in run'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:26:in `each'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/runner.rb:26:in `run'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/lib/haml_lint/cli.rb:59:in `run'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/bin/haml-lint:8:in `block in <top (required)>'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/bin/haml-lint:6:in `tap'
    from /home/mde/.gem/ruby/2.1.2/gems/haml-lint-0.5.2/bin/haml-lint:6:in `<top (required)>'
    from /home/mde/.gem/ruby/2.1.2/bin/haml-lint:23:in `load'
    from /home/mde/.gem/ruby/2.1.2/bin/haml-lint:23:in `<main>'
@sds
Copy link
Owner

sds commented Jul 8, 2014

Hey @MicahElliott, sorry for the delay in getting back to you.

I've tried running haml-lint against your example (ruby 2.1.2, haml-lint 0.5.2) and I can't reproduce the issue.

Which version of the haml gem do you have installed? There might be an expected problem with a slightly older minor version (e.g. something older than 4.0.5) which causes this problem.

@sds sds closed this as completed Jul 8, 2014
@sds sds added bug and removed bug labels Jul 8, 2014
@sds sds added the invalid label Sep 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants