sk- / git-lint

improving source code one step at a time
Apache License 2.0
236 stars 78 forks source link

Check for shellbang if file has no extension #98

Closed kalkin closed 7 years ago

kalkin commented 7 years ago

This commit allows specifieng the shellbang via shellbang key by providing the executable line. The shellbang value should not contain the actual shellbang (#!) to ease up YAML integration.

kalkin commented 7 years ago

Hmm, I see my aproach might be too simple

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 24e1a62cf62145c122d401c99252cc957314ca96 on kalkin:shellbang into on sk-:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 288b6c769cb177d1e9a632ab49ff32a7d8db26b1 on kalkin:shellbang into on sk-:master.

sk- commented 7 years ago

I think a much better approach would be to use filemagic or Github's linguist (there's a python clone). The problem with shebangs is that they are uniform some people define it as #!/usr/bin/python, some add the path to env, and others even have non-standard paths.

kalkin commented 7 years ago

@sk- douban/linguist doesn't work for me.

Both projects linguist & charlockholmes look abandoned. It will take some work to fix, update them and even may be release/maintain the forks on pypi. May be we could split the work? Every one of takes the responsibility over one dependency? Of course I would only do all the work if you really plan to integrate linguist.