question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spaced-line-comment fails sometimes with shebang

See original GitHub issue

In the following example, I get Expected space or tab after // in comment at 1:0:

{
  "rules": {
    "spaced-line-comment": [2, "always"]
  }
}
#!/usr/bin/env node
''
// Foo
''

I do not know if my test are relevant but the error disappears if:

  • I delete any of the 3 following lines
  • the second line is not a literal
  • the third line is not a comment

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
kaicataldocommented, Mar 19, 2016

I can take a look at this - feel pretty comfortable with the way we add comments in Espree now 😃

0reactions
ilyavolodincommented, Mar 20, 2016

Nice. Closing as it looks like it’s fixed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Strange Case of the Malformed Shebang - Natan Yellin
Here is a common error you might encounter on Linux: you download a Python script from the internet and try to run it....
Read more >
shebang not working for python script - Stack Overflow
created one file executeme.py #!/usr/bin/env python print("hello"). make it as executable (optional) chmod a+x executeme.py. reanme the file
Read more >
Shebang length exceeded in pip executable #1773 - GitHub
When the shebang length limit is exceeded, pip fails with the error: "bad interpreter: No such file or directory". The maximum length for...
Read more >
Chicken-egg problem with the shebang line [duplicate]
But it seems there's some logic issue here: If the shell script is not executed, it cannot be known which interpreter to use....
Read more >
The case of the supersized shebang - LWN.net
Several failures had to align perfectly for this to happen: This is very often the case. A functioning quality control system has multiple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found