Closed JustinAiken closed 7 years ago
It looks like whatever codeclimate
is returning within Atom is invalid JSON, will the developer tools let you place a breakpoint here to try to get the raw output?
Hmm, setting the breakpoint there isn't working, but trying to step through gives me a backtrace now:
SyntaxError: Unexpected token U
at parse (native)
at process._tickCallback (internal/process/next_tick.js:103:7)
at Object.provider.lint (/Users/jaiken/.atom/packages/linter-codeclimate/lib/linter-codeclimate.coffee:54:13)
at promises.push.Promise.then._this.emitter.emit.linter (/Users/jaiken/.atom/packages/linter/lib/linter-registry.js:63:26)
at /Users/jaiken/.atom/packages/linter/lib/linter-registry.js:62:23
at Set.forEach (native)
at LinterRegistry.lint (/Users/jaiken/.atom/packages/linter/lib/linter-registry.js:60:18)
at /Users/jaiken/.atom/packages/linter/lib/linter.coffee:98:16
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
at /Users/jaiken/.atom/packages/linter/lib/editor-linter.js:30:20
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:129:28)
at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1156:27)
at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1126:19)
at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:755:26)
at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:734:18)
at Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:3:61)
at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:717:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:695:35)
at atom-workspace.commandRegistry.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:220:32)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)
@JustinAiken sorry for not responding earlier.
Unfortunately we need the raw output that is being processed to see what is really wrong, all that stack trace tells us is that my guess that it is within the JSON.parse
call is correct.
Once we get CI working I'm going to migrate this project to ES2017 so we can actually get proper breakpoints working, stupid CoffeeScript...