You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFE: check scripts with shebangs are executable #543
A check that does the opposite of check-executables-have-shebangs would be useful; one that verifies scripts with shebangs are executable. Maybe call it just check-executability or something.
Do you think that would be welcome here? If yes, I think I could have a go at writing one. Let me also know if you have a name you'd prefer for this.
it wasn't added with check-executables-have-shebangs because there are a lot of special cases and I don't really want to encode them into a script (since it'd be very noisy). A number of things (mis)use first-line comments starting with #! to mean things that are different than shebangs unfortunately
it's still possible to write something like this, and it may still be useful for some, but that's why I've avoided incorporating it here so far
Yeah, I'd keep the test simple and leave worrying about abuse of shebangs to those who do that, they can choose to use exclude the way they want, or just not use the check in the first place.
Activity
asottile commentedon Jan 8, 2021
it wasn't added with
check-executables-have-shebangsbecause there are a lot of special cases and I don't really want to encode them into a script (since it'd be very noisy). A number of things (mis)use first-line comments starting with#!to mean things that are different than shebangs unfortunatelyit's still possible to write something like this, and it may still be useful for some, but that's why I've avoided incorporating it here so far
scop commentedon Jan 8, 2021
Yeah, I'd keep the test simple and leave worrying about abuse of shebangs to those who do that, they can choose to use
excludethe way they want, or just not use the check in the first place.asottile commentedon Jan 8, 2021
would you like to work on this?
scop commentedon Jan 8, 2021
Sure, can do, just discussing desirability here first.