jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.96k stars 513 forks source link

Internal error, AssertionError: Unable to add an error, `column` should be a positive number but -1 given #2190

Closed GarryFlemings closed 8 years ago

GarryFlemings commented 8 years ago

Probable duplicate of #2145. (Didn't see that one before posting; regrets.) Following their good lead:

No complaints; I hope this helps. Anonymized a bit. The first report on this run was for disallowCapitalizedComments (at the same location in my source). This was the second report.

internalError: Error running rule jsDoc: This is an issue with JSCS and not your codebase.
Please file an issue (with the stack trace below) at: https://github.com/jscs-dev/node-jscs/issues/new
AssertionError: Unable to add an error, `column` should be a positive number but -1 given
    at Object.Errors._validateInput (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\lib\errors.js:73:9)
    at Object.Errors.add (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\lib\errors.js:46:14)
    at addError (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\rules\validate-jsdoc.js:166:28)
    at C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\rules\validate-jsdoc.js:181:25
    at Object.requireReturnTypes (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\rules\validate-jsdoc\require-return-types.js:17:9)
    at C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\rules\validate-jsdoc.js:145:27
    at Array.forEach (native)
    at DocComment.<anonymous> (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\rules\validate-jsdoc.js:144:46)
    at Array.forEach (native)
    at DocComment.forEachTag [as iterate] (C:\Users\...\AppData\Roaming\npm\node_modules\jscs\node_modules\jscs-jsdoc\lib\jsdoc.js:86:19) at test.js :
     1 |/*******************************************************************************
--------^
     2 | * <comment>
     3 | * <comment>

Thanks for doing this valuable and interesting project!

louisch commented 8 years ago

I am getting a similar error, and what seems to trigger it is an @returns block, which is missing its type. Funnily enough, I can put this on any JSDoc comment in the tab, and it will trigger this error.

e.g.

/**
 * <summary>
 *
 * @return <comment>

(Not @return {type} <comment>)

markelog commented 8 years ago

Should work with 3.x

markelog commented 8 years ago

/cc @zxqfox

qfox commented 8 years ago

Huh, we definitely missing tests for jsdoc... ;-(

markelog commented 8 years ago

So is this still valid?

qfox commented 8 years ago

Guess, yes. I'll try to look at it tomorrow.

markelog commented 8 years ago

At this point only major and CST related bugs will be fixed.

You however open ticket on https://github.com/jscs-dev/jscs-jsdoc and keep pinging @zxqfox