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.

identify script file to be linted by shebang alone

See original GitHub issue

In atom I use a shellcheck linter extension and it can identify a bash shell file to lint solely based on the existence of the shebang without need of a common extension like .sh. https://atom.io/packages/linter-shellcheck

As a matter of organization I don’t always want to use the .sh extension on my script files but always include the shebang.

Does the extension support this? If so how do I enable? If not it should be added (I might be the one to write a PR if I can get some help).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
felipecrscommented, Jan 29, 2021

This is because files named env are recognized as “dotenv” files. You can manually set the association though:

fI3Ecfz7vm

Consider opening an issue in the vscode repo instead. The shellscript language association comes from there. Something like:

“Shebang should take precedence over filename for files named env” or something like that.

0reactions
felipecrscommented, Jan 29, 2021

Feel free to reference this issue once you open the new one. I’ll support you with a 👍.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I put #! (shebang) in Python scripts, and what form ...
If it is a stand-alone script this answer is to the point. If the file is just an entry point of a larger...
Read more >
Find all scripts with a given shebang line with find & sed
I want to find out all scripts with a specific shebang line. Specifically, I want all files that match the following criteria:.
Read more >
Bad interpreter error when executing shell script with the ...
The shebang line reads #!/bin/bash. I used the command "export PATH=$PATH:repos/utilities " to direct to the directory storing these scripts, ...
Read more >
Shebang length exceeded in pip executable #1773
A work-around for this problem is to not run pip directly, but run the python interpreter and pass the pip script to python...
Read more >
Shebang (Unix)
In computing, a shebang is the character sequence consisting of the characters number sign and exclamation mark ( #!) at the beginning of...
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