Open codazoda opened 8 years ago
You forgot the dollar prefix on the variable name. When using type declaration arguments it highlight as error but it doesn't prompt any error and build the comment correctly.
For me in php script, you insert a js script and you would add a comment on it :
<?php echo "poooo"; ?>
<script>
/**{enter}{crack-bug}
function jsfunciton(){
....
}
</script>
My bug report is specifically about the behavior when you have a typo that results in a syntax error. Probably a low priority as a result.
When i have the bug, Atom redirected me to this bug, the same error code.
I have the same issue for valid code in C/C++
void foo(int&);
or void foo(int*);
/**
Atom Version: 1.3.1 System: "Arch Linux" Thrown From: docblockr package, v0.7.3
Uncaught TypeError: Cannot read property '1' of null
At /home/matthew/.atom/packages/docblockr/lib/languages/cpp.js:64
TypeError: Cannot read property '1' of null
at DocsParser.CppParser.get_arg_name (/home/matthew/.atom/packages/docblockr/lib/languages/cpp.js:64:19)
at DocsParser.parse_args (/home/matthew/.atom/packages/docblockr/lib/docsparser.js:265:48)
at DocsParser.CppParser.parse_args (/home/matthew/.atom/packages/docblockr/lib/languages/cpp.js:49:44)
at DocsParser.format_function (/home/matthew/.atom/packages/docblockr/lib/docsparser.js:130:32)
at DocsParser.parse (/home/matthew/.atom/packages/docblockr/lib/docsparser.js:44:37)
at DocBlockrAtom.module.exports.DocBlockrAtom.parse_command (/home/matthew/.atom/packages/docblockr/lib/docblockr-worker.js:279:29)
at atom-workspace.<anonymous> (/home/matthew/.atom/packages/docblockr/lib/docblockr-worker.js:75:16)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)
-0:29 editor:newline (atom-text-editor.editor.is-focused)
2x -0:27.4.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-0:23.1.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
-0:22.7.0 core:delete (atom-text-editor.editor.is-focused)
-0:21 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-0:04.8.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
-0:04.5.0 core:delete (atom-text-editor.editor.is-focused)
2x -0:03.9.0 core:backspace (atom-text-editor.editor.is-focused)
-0:02.5.0 core:save (atom-text-editor.editor.is-focused)
-0:02.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-0:02.0 editor:newline (atom-text-editor.editor.is-focused)
-0:01.3.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:01.3.0 snippets:expand (atom-text-editor.editor.is-focused)
-0:01.3.0 docblockr:parse-tab (atom-text-editor.editor.is-focused)
-0:01.3.0 editor:indent (atom-text-editor.editor.is-focused)
-0:00.3.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-material-ui",
"one-light-syntax"
]
}
}
# User
atom-material-ui, v0.8.1
docblockr, v0.7.3
file-icons, v1.6.14
hyperclick, v0.0.35
language-cpp14, v0.6.0
language-latex, v0.6.1
language-squirrel, v0.4.3
linter, v1.11.3
linter-javac, v1.5.0
linter-jshint, v2.0.2
pdf-view, v0.39.0
# Dev
No dev packages
I have seen this too. Is this plugin abandoned?
I'm getting this error when I call the WrapLines command.
Just got this error while documenting a C++ member function declaration.
docblockr version: 0.8.4
The snippet of code causing the issue:
class DukThread {
public:
DukThread ();
/** <- crash here */
void eval (const std::string& script,
const boost::function<void (std::string&)>& onSuccess,
const boost::function<void (std::string&)>& onError = [](std::string& result){ std::cerr << "DukThread " << result << std::endl; });
...
}
I'd also receive this error for C++ header code on a function using un-named parameters.
This error appears in various cases, but Atom sends everyone to this issue. If you see this error, Atom sends you to this page and your problem is not yet covert: please open a new issue and describe the behavior that lead to the error.
void foo(int&)
) by @Eadword and perhaps @sgtcoolguy (..?)
I can reproduce this. PR #174 addresses this problem.WrapLines
by @jasperkennis
Sorry I can't reproduce this and have no starting point for debugging this error. Please provide more information.void test (foo<void (bar&)> baz);
and still reproduce the error. The problem is this bar&
. Maybe #174 will resolve this too.Edit: I thought blocking an Issue would limit access to participants but it removes access for all users, so I won't do that.
WrapLines
error.The Error with unnamed function parameters in C++
was fixed by @jeremyvii.
Version v0.8.6 released the fix.
The Wrap Lines
Error was fixed by #222
This did not seem to fix it for me. I'm still seeing this same error, even after upgrading.
@jordwalke As described in my comment above, this issue describes multiple errors. Some off them got fixed, some didn't. What particular problem did you experience?
The wrap lines error still occurs with the same message in the OP.
@jordwalke This problem is not fixed yet. See my comment.
Still happens to this day.
Steps to reproduce:
Type the following code and save it into a file called
bug.php
.Move just above the function and type
/**
and press enter. You'll get the error.Notice that my private function has a syntax error. It should be
$number
instead ofnumber
, but it would be awesome if docblockr didn't throw an uncaught error here.Atom Version: 1.4.2 System: Mac OS X 10.11.1 Thrown From: docblockr package, v0.7.3
Stack Trace
Uncaught TypeError: Cannot read property '1' of null
Commands
Config
Installed Packages