esvalid icon indicating copy to clipboard operation
esvalid copied to clipboard

Categorize reported errors.

Open ikarienator opened this issue 11 years ago • 3 comments

For example:

  • Structural Context (SC)
  • Duplication Not Allowed (DNA)
  • Restricted Names (RN)
  • Incorrect Type (IT)
  • Nullability (N)

ikarienator avatar Jul 15 '14 21:07 ikarienator

  • Structural Context 543: ReturnStatement must be nested within a FunctionExpression or FunctionDeclaration node
  • Structural Context 175: BreakStatement must have an IterationStatement or SwitchStatement as an ancestor
  • Structural Context 180: labelled BreakStatement must have a matching LabeledStatement ancestor
  • Structural Context 231: ContinueStatement must have an IterationStatement as an ancestor
  • Structural Context 236: labelled ContinueStatement must have a matching LabeledStatement ancestor
  • Structural Context 377: IfStatement with null alternate must not be the consequent of an IfStatement with a non-null alternate
  • Duplication 393: LabeledStatement must not be nested within a LabeledStatement with the same label
  • Duplication 514: duplicate data property in object literal not allowed in strict mode
  • Duplication: duplicate parameter names in function decl/expr not allowed in strict mode
  • Restricted Names: In strict mode, eval and arguments cannot appear at:
    • function parameters
    • setter parameters
    • AssignmentExpression.left
    • function names
    • catch variable
    • variable declarations
  • Restricted Names 363: Identifier name member must a valid IdentifierName
  • Restricted Names 365: Identifier name member must not be a ReservedWord
  • Restricted Names 365: Identifier name member must not be a FutureReservedWord
  • Incorrect Type 415: numeric Literal nodes must not be NaN
  • Incorrect Type 418: numeric Literal nodes must not be negative
  • Incorrect Type 420: numeric Literal nodes must be finite
  • Incorrect Type 642: TryStatement must have a non-null handler member or a non-null finalizer member
  • Incorrect Type 452: static MemberExpression property member must have a valid IdentifierName name member
  • Incorrect Type 556: SequenceExpression expressions member length must be >= 2
  • Incorrect Type 596: SwitchStatement cases member length must be >= 1
  • Incorrect Type 606: SwitchStatement cases member must contain no more than one SwitchCase with a null test member
  • Incorrect Type 668: VariableDeclaration declarations member must be non-empty
  • Incorrect Type: with Statement in strict mode

Strict Mode related:

  • Duplication 514: duplicate data property in object literal not allowed in strict mode
  • Duplication: duplicate parameter names in function decl/expr not allowed in strict mode
  • Restricted Names: In strict mode, eval and arguments cannot appear at: ...
  • Restricted Names 365: Identifier name member must not be a FutureReservedWord
  • Incorrect Type: with Statement in strict mode

ikarienator avatar Jul 15 '14 21:07 ikarienator

@ikarienator What do the numbers mean? Are they intended to be unique identifiers for the specific error types?

anko avatar Jun 07 '15 10:06 anko

As I understood it, they are just unique numbers, which would be sufficient for most purposes. Maybe @ikarienator meant to imply some sort of categorisation?

michaelficarra avatar Jun 07 '15 14:06 michaelficarra