rpmlint icon indicating copy to clipboard operation
rpmlint copied to clipboard

Restrict wrong-script-interpreter warning to executable files

Open scop opened this issue 12 years ago • 3 comments

(From http://rpmlint.zarb.org/cgi-bin/trac.cgi/ticket/84, dmueller@…)

the wrong-script-interpreter warning has way too many false positves because of various file formats that start with a shellbang, even though they're not supposed to be executed.

my workaround was to only apply the check for executable files.

Changed 6 years ago by scop

Could you give some examples of file formats for which this patch would bring benefits?

Changed 6 years ago by dmueller@…

there are a couple of packages that contain config files that start for whatever reason with a shellbang, even though they're not marked as executable.

my question would be why to check for shellbang in a file that is not executable: if you try to run it, it won't run as its not marked as executable, so you have to know already which interpreter to use.

Changed 6 years ago by anonymous

the texmf config files are only one liners, so another way to suppress it would be to check if the file has more than one line.

Original comment by: scop

scop avatar Apr 02 '13 20:04 scop

  • Milestone: 1.5 --> 1.7

Original comment by: scop

scop avatar Jul 19 '14 13:07 scop

  • Milestone: 1.7 --> future

Original comment by: scop

scop avatar Jan 24 '15 09:01 scop

script-interpreter-only-for-exec-scripts.diff from original ticket: https://gist.github.com/scop/1ac1ed97917e65eb7806

scop avatar Jul 10 '15 07:07 scop