Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standard catching error in standard #10

Closed
keithhamilton opened this issue Jan 28, 2015 · 3 comments

Comments

@keithhamilton
Copy link

commented Jan 28, 2015

This might have something to do with the installed toolset on my machine, but i tried running standard after installing globally (npm install -g standard), and I am getting an error thrown on what appears to the standard's index file.

➜  lib (master) standard
Error: Code style check failed:

/usr/local/lib/node_modules/standard/index.js:90
              var fileA = FILE_RE.exec(a)[1]
                                         ^
TypeError: Cannot read property '1' of null
    at /usr/local/lib/node_modules/standard/index.js:90:42
    at Array.sort (native)
    at /usr/local/lib/node_modules/standard/index.js:88:14
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/standard/index.js:133:21)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Have you seen this before, and/or know what the issue might be?

@feross

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

@keithhamilton This means that jshint or jscs is outputting some text that is unexpected. I'll tighten up that code to prevent unexpected output from causing an error. But I'm curious what's getting printed.

Can you update standard to 1.4.0:

npm install standard -g

Then use the new --bare option and paste the output here:

standard --bare

Thanks!

@keithhamilton

This comment has been minimized.

Copy link
Author

commented Jan 29, 2015

Looks good! Well, i have a lot of errors, but it's working well :) Thanks @feross

language (language) standard                                                                                     ✭ ✱
Error: Code style check failed:
  entityReduction.js:3:5: 'NGrams' is defined but never used.
  entityReduction.js:39:0: Multiple line break
  entityReduction.js:78:0: Multiple line break
  entityReduction.js:80:0: 'findFunctionalTerm' is not defined
  entityReduction.js:80:1: 'findFunctionalTerm' is not defined.
  entityReduction.js:80:29: Missing space before opening round brace
  entityReduction.js:80:36: Missing space before opening curly brace
  entityReduction.js:80:37: Missing space before opening brace
  entityReduction.js:83:62: Missing space before opening round brace
  entityReduction.js:83:68: Missing space before opening curly brace
  entityReduction.js:83:69: Missing space before opening brace
  entityReduction.js:85:1: Trailing spaces not allowed
  entityReduction.js:85:4: Illegal trailing whitespace
  entityReduction.js:86:30: Missing space before opening round brace
  entityReduction.js:86:36: Missing space before opening curly brace
  entityReduction.js:86:37: Missing space before opening brace
  entityReduction.js:87:6: Keyword "if" must be followed by whitespace
  entityReduction.js:87:19: Missing space before opening brace
  entityReduction.js:89:10: Extra quotes for key
  entityReduction.js:89:70: Missing space before opening round brace
  entityReduction.js:89:73: A space is required after ','
  entityReduction.js:89:73: Missing space before function parameter 'b'
  entityReduction.js:89:74: Missing space before opening curly brace
  entityReduction.js:89:75: Missing space before opening brace
  entityReduction.js:91:10: Extra quotes for key
  entityReduction.js:97:15: Missing space before opening round brace
  entityReduction.js:97:20: Missing space before opening curly brace
  entityReduction.js:97:21: Missing space before opening brace
  entityReduction.js:98:31: Missing space before opening round brace
  entityReduction.js:98:39: Missing space before opening curly brace
  entityReduction.js:98:40: Missing space before opening brace
  entityReduction.js:99:21: Expected '!==' and instead saw '!='
  entityReduction.js:99:24: Expected '!==' and instead saw '!='.
  entityReduction.js:103:18: Missing space before opening round brace
  entityReduction.js:103:23: Missing space before opening curly brace
  entityReduction.js:103:24: Missing space before opening brace
  entityReduction.js:106:1: Trailing spaces not allowed
  entityReduction.js:106:2: Illegal trailing whitespace
  entityReduction.js:107:16: Missing space before opening round brace
  entityReduction.js:107:21: Missing space before opening curly brace
  entityReduction.js:107:22: Missing space before opening brace
  entityReduction.js:112:0: 'reduceToEntities' is not defined
  entityReduction.js:112:1: 'reduceToEntities' is not defined.
  entityReduction.js:112:27: Missing space before opening round brace
  entityReduction.js:112:37: Missing space before opening curly brace
  entityReduction.js:112:38: Missing space before opening brace
  entityReduction.js:113:54: Missing space before opening round brace
  entityReduction.js:113:59: Missing space before opening curly brace
  entityReduction.js:113:60: Missing space before opening brace
  entityReduction.js:114:48: Missing space before opening round brace
  entityReduction.js:115:2: Expected indentation of 2 characters
  entityReduction.js:118:76: Illegal trailing whitespace
  entityReduction.js:118:76: Trailing spaces not allowed
  entityReduction.js:120:12: Illegal trailing whitespace
  entityReduction.js:120:12: Trailing spaces not allowed
  entityReduction.js:122:1: Trailing spaces not allowed
  entityReduction.js:122:3: Illegal trailing whitespace
  entityReduction.js:134:34: Missing space before opening round brace
  entityReduction.js:134:41: Missing space before opening curly brace
  entityReduction.js:134:42: Missing space before opening brace
  entityReduction.js:135:19: 'findFunctionalTerm' is not defined
  entityReduction.js:135:20: 'findFunctionalTerm' is not defined.
  entityReduction.js:136:28: 'reduceToEntities' is not defined
  entityReduction.js:136:29: 'reduceToEntities' is not defined.
  sentenceBuilder.js:1:32: Missing space before opening round brace
  sentenceBuilder.js:1:33: Missing space before opening curly brace
  sentenceBuilder.js:1:34: Missing space before opening brace
  sentenceBuilder.js:1:35: Expected no padding newline after opening curly brace
  sentenceBuilder.js:3:0: Expected no padding newline before closing curly brace
@feross

This comment has been minimized.

Copy link
Member

commented Jan 30, 2015

Cool, glad it's working great for you!

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.