AtomLinter / linter-haml

Atom linter plugin for HAML, using haml-lint
4 stars 8 forks source link

Uncaught TypeError: Cannot read property 'match' of undefined #14

Closed tsbarnes closed 8 years ago

tsbarnes commented 9 years ago

Seems to happen as I'm typing after having just backspaced through something.

Atom Version: 1.0.5 System: Ubuntu 15.04 Thrown From: linter-haml package, v1.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'match' of undefined

At /opt/atom/resources/app.asar/src/tokenized-buffer.js:680

TypeError: Cannot read property 'match' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/opt/atom/resources/app.asar/src/tokenized-buffer.js:680:23)
    at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/opt/atom/resources/app.asar/src/display-buffer.js:820:35)
    at TextEditor.module.exports.TextEditor.indentLevelForLine (/opt/atom/resources/app.asar/src/text-editor.js:2250:33)
    at TextEditor.module.exports.TextEditor.indentationForBufferRow (/opt/atom/resources/app.asar/src/text-editor.js:2222:19)
    at /home/scott/.atom/packages/linter-haml/lib/linter.coffee:166:42
    at Function.self.forEach (/home/scott/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
    at BufferedProcess.exit (/home/scott/.atom/packages/linter-haml/lib/linter.coffee:164:23)
    at triggerExitCallback (/opt/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /opt/atom/resources/app.asar/src/buffered-process.js:220:18
    at Socket.<anonymous> (/opt/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:166:7)
    at Pipe.close (net.js:464:12)

Commands

     -0:44.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:44.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:42.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:23.9.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:23.5.0 core:move-left (atom-text-editor.editor.is-focused)
  2x -0:19.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:15 core:move-right (atom-text-editor.editor.is-focused)
     -0:14.1.0 core:move-left (atom-text-editor.editor.is-focused)
  7x -0:12.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:09.9.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:09.6.0 core:move-left (atom-text-editor.editor.is-focused)
  2x -0:09.4.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:02.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:01.9.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:01.9.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:01.9.0 editor:indent (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "/home/scott/Documents/Code",
    "disabledPackages": [
      "language-ruby"
    ],
    "themes": [
      "one-outlander-ui",
      "gruvbox"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.11
atom-django, v0.3.0
autocomplete-php, v0.3.6
autocomplete-python, v0.5.3
autocomplete-ruby, v0.1.0
autocomplete-sass, v0.1.0
browser-refresh, v0.9.0
color-picker, v2.0.11
django-templates, v0.5.0
file-icon-supplement, v0.8.3
file-icons, v1.6.3
git-tab-status, v1.9.2
grunt-runner, v0.11.0
gruvbox, v1.0.5
language-apache, v1.3.0
language-cmake, v0.1.4
language-conky, v0.2.0
language-dart, v0.2.0
language-diff, v0.3.0
language-dotenv, v1.0.0
language-gettext, v0.6.1
language-gitignore, v0.2.0
language-haml, v0.21.0
language-htaccess, v0.1.1
language-ini, v1.11.0
language-log, v0.5.0
language-lua, v0.9.4
language-qml, v1.0.0
language-rspec, v0.3.0
language-ruby-without-erb, v0.52.0
language-svg, v0.8.0
linter, v1.3.4
linter-bootlint, v0.0.6
linter-coffeelint, v1.0.2
linter-cpplint, v0.1.4
linter-csslint, v1.0.5
linter-erb, v0.1.1
linter-haml, v1.0.0
linter-js-yaml, v1.1.1
linter-jshint, v1.1.5
linter-less, v2.0.3
linter-lua, v1.0.0
linter-pep8, v1.0.1
linter-ruby, v1.0.1
linter-scss-lint, v2.0.0
linter-shellcheck, v1.0.1
linter-xmllint, v0.0.7
minimap, v4.12.2
minimap-git-diff, v4.1.7
one-outlander-ui, v0.3.1
pigments, v0.9.3
recent-projects, v0.7.6
tabs-to-spaces, v0.11.0
travis-ci-status, v0.16.0
tree-view-git-status, v0.1.2

# Dev
No dev packages
Bjoernsen commented 9 years ago
  1. created new file: new.html.haml
  2. created new div: #something

Atom Version: 1.0.7 System: Ubuntu 14.04.2 Thrown From: linter-haml package, v1.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'match' of undefined

At /usr/share/atom/resources/app.asar/src/tokenized-buffer.js:680

TypeError: Cannot read property 'match' of undefined
  at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:680:23)
  at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/usr/share/atom/resources/app.asar/src/display-buffer.js:820:35)
  at TextEditor.module.exports.TextEditor.indentLevelForLine (/usr/share/atom/resources/app.asar/src/text-editor.js:2250:33)
  at TextEditor.module.exports.TextEditor.indentationForBufferRow (/usr/share/atom/resources/app.asar/src/text-editor.js:2222:19)
  at /home/bjoern/.atom/packages/linter-haml/lib/linter.coffee:113:38
  at Function.self.forEach (/home/bjoern/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
  at BufferedProcess.exit (/home/bjoern/.atom/packages/linter-haml/lib/linter.coffee:112:19)
  at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
  at /usr/share/atom/resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -6:12.6.0 editor:select-to-end-of-word (atom-text-editor.editor.is-focused)
     -6:11.1.0 core:save (atom-text-editor.editor.is-focused)
     -6:06.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -6:06.6.0 core:move-up (atom-text-editor.editor.is-focused)
     -6:06.4.0 core:select-down (atom-text-editor.editor.is-focused)
     -6:06.2.0 core:delete (atom-text-editor.editor.is-focused)
  2x -6:05.2.0 core:save (atom-text-editor.editor.is-focused)
  2x -1:28.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -1:18.2.0 core:save (atom-text-editor.editor.is-focused)
     -1:12.8.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -1:12.6.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:12.1.0 core:select-down (atom-text-editor.editor.is-focused)
     -1:11.9.0 core:delete (atom-text-editor.editor.is-focused)
     -1:11.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:51.6.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:50.9.0 core:delete (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "railscast-theme"
    ],
    "audioBeep": false,
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
autocomplete-emojis, v2.2.2
color-picker, v2.0.11
file-icons, v1.6.7
git-plus, v5.4.6
git-tab-status, v1.9.2
highlight-line, v0.11.0
highlight-selected, v0.10.1
language-haml, v0.21.0
linter, v1.4.3
linter-haml, v1.0.0
linter-rubocop, v0.3.2
markdown-scroll-sync, v0.4.0
minimap, v4.13.1
minimap-git-diff, v4.1.8
project-manager, v1.15.11
railscast-theme, v0.3.0

# Dev
No dev packages
steelbrain commented 9 years ago

@Bjoernsen Aha! That trace is very helpful!

mico commented 9 years ago
  1. created new file: dir/sent.html.ham
  2. typed: = ""

Atom Version: 1.0.7 System: Mac OS X 10.10.5 Thrown From: linter-haml package, v1.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'match' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680

TypeError: Cannot read property 'match' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680:23)
    at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:820:35)
    at TextEditor.module.exports.TextEditor.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2250:33)
    at TextEditor.module.exports.TextEditor.indentationForBufferRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2222:19)
    at /Users/mico/.atom/packages/linter-haml/lib/linter.coffee:166:42
    at Function.self.forEach (/Users/mico/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
    at BufferedProcess.exit (/Users/mico/.atom/packages/linter-haml/lib/linter.coffee:164:23)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
    at emitTwo (events.js:87:13)

Commands

     -0:41.1.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
  2x -0:40.4.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
  3x -0:39.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:39.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:37.8.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:37.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:36 core:move-right (atom-text-editor.editor.is-focused)
     -0:35.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:35.3.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:34.9.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:34.6.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
  4x -0:34.3.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:33.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:32.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:03.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ],
    "disabledPackages": [
      "symbols-view",
      "linter-ruby",
      "linter-csslint",
      "linter-scss-lint"
    ]
  }
}

Installed Packages

# User
atom-ctags, v4.2.0
file-icons, v1.6.9
language-haml, v0.21.0
language-plantuml, v0.1.1
linter, v1.4.3
linter-haml, v1.0.0
linter-rubocop, v0.3.3
plantuml-viewer, v0.6.0
symbols-tree-view, v0.9.3

# Dev
No dev packages
reubenbrown commented 9 years ago

Info

Steps to reproduce

Stack Trace

TypeError: Cannot read property 'match' of undefined
  at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680:23)
  at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:820:35)
  at TextEditor.module.exports.TextEditor.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2312:33)
  at TextEditor.module.exports.TextEditor.indentationForBufferRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2284:19)
  at /Users/reubenbrown/.atom/packages/linter-haml/lib/linter.coffee:113:38
  at Function.self.forEach (/Users/reubenbrown/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
  at BufferedProcess.exit (/Users/reubenbrown/.atom/packages/linter-haml/lib/linter.coffee:112:19)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:169:7)
  at Process.ChildProcess._handle.onexit (child_process.js:1057:12)
TypeError: Cannot read property 'match' of undefined
  at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680:23)
  at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:820:35)
  at TextEditor.module.exports.TextEditor.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2312:33)
  at TextEditor.module.exports.TextEditor.indentationForBufferRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2284:19)
  at /Users/reubenbrown/.atom/packages/linter-haml/lib/linter.coffee:113:38
  at Function.self.forEach (/Users/reubenbrown/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
  at BufferedProcess.exit (/Users/reubenbrown/.atom/packages/linter-haml/lib/linter.coffee:112:19)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)
steelbrain commented 9 years ago

cc @jschroeder9000

mico commented 9 years ago

[Enter steps to reproduce below:]

  1. Open any haml file
  2. Add code:
  # entity_views_vars(@entity).merge({title:t(".#{@stream.short_type}.title_with_count",
  #   count: @stream.origin_stream_posts.count, default: stream_post_title)}))

Atom Version: 1.0.15 System: Mac OS X 10.10.5 Thrown From: linter-haml package, v1.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'match' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680

TypeError: Cannot read property 'match' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:680:23)
    at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:817:35)
    at TextEditor.module.exports.TextEditor.indentLevelForLine (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2284:33)
    at TextEditor.module.exports.TextEditor.indentationForBufferRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2256:19)
    at /Users/mico/.atom/packages/linter-haml/lib/linter.coffee:166:42
    at Function.self.forEach (/Users/mico/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
    at BufferedProcess.exit (/Users/mico/.atom/packages/linter-haml/lib/linter.coffee:164:23)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
    at emitTwo (events.js:87:13)

Commands

     -0:02.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:01.5.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ],
    "disabledPackages": [
      "symbols-view",
      "linter-ruby",
      "linter-csslint",
      "linter-scss-lint"
    ]
  }
}

Installed Packages

# User
atom-ctags, v4.2.0
clipboard-history, v0.6.6
file-icons, v1.6.9
language-haml, v0.21.0
language-plantuml, v0.1.1
linter, v1.4.3
linter-haml, v1.0.0
linter-rubocop, v0.3.3
plantuml-viewer, v0.6.0
symbols-tree-view, v0.9.3

# Dev
No dev packages
laCour commented 9 years ago

[Enter steps to reproduce below:]

  1. Opened atom with an existing haml file containing:
%

Atom Version: 1.0.18 System: "Manjaro Linux" Thrown From: linter-haml package, v1.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'match' of undefined

At /usr/share/atom/resources/app.asar/src/tokenized-buffer.js:680

TypeError: Cannot read property 'match' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.indentLevelForLine (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:680:23)
    at DisplayBuffer.module.exports.DisplayBuffer.indentLevelForLine (/usr/share/atom/resources/app.asar/src/display-buffer.js:817:35)
    at TextEditor.module.exports.TextEditor.indentLevelForLine (/usr/share/atom/resources/app.asar/src/text-editor.js:2284:33)
    at TextEditor.module.exports.TextEditor.indentationForBufferRow (/usr/share/atom/resources/app.asar/src/text-editor.js:2256:19)
    at /home/jonathan/.atom/packages/linter-haml/lib/linter.coffee:166:42
    at Function.self.forEach (/home/jonathan/.atom/packages/linter-haml/node_modules/xregexp/xregexp-all.js:542:22)
    at BufferedProcess.exit (/home/jonathan/.atom/packages/linter-haml/lib/linter.coffee:164:23)
    at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
    at ChildProcess.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:235:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
autocomplete-elixir, v1.3.12
color-picker, v2.0.12
coverage, v0.6.1
css-color-underline, v1.0.1
editorconfig, v1.2.0
highlight-selected, v0.10.1
language-elixir, v0.5.2
language-haml, v0.22.2
language-rspec, v0.3.0
linter, v1.6.0
linter-coffeelint, v1.1.0
linter-elixirc, v0.2.2
linter-haml, v1.0.0
linter-rubocop, v0.4.1
linter-scss-lint, v2.0.0
minimap, v4.13.4
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.1

# Dev
No dev packages