ansys / pre-commit-hooks

Ansys-developed pre-commit hooks for automating style and formatting
https://pre-commit-hooks.docs.ansys.com/
MIT License
5 stars 1 forks source link

Bash scripts are currently unrecognized since the there is no file extension #101

Open dipinknair opened 9 months ago

dipinknair commented 9 months ago

📝 Description of the feature

Bash scripts are failing in pre-commit license because of it does not have extension and hence error is coming as unrecognized file.

Skipped unrecognised file D:\PyAnsys\Repos\pymechanical-env\src\ansys\mechanical\env\mechanical-env

eg: mechanical-env https://github.com/ansys/pymechanical-env/blob/main/src/ansys/mechanical/env/mechanical-env

💡 Steps for implementing the feature

It can be fixed or we can exclude files using exclude option and manually update license

🔗 Useful links and references

No response

RobPasMue commented 9 months ago

I don't believe this is the hook's issue. The main problem is that the file has no extension. All files should have extensions (except for binaries on Linux IMO).

RobPasMue commented 9 months ago

My only suggestion is that we also enable a way to pass in a file location explicitly, and we assume that whatever file passed is in ASCII.