ShellMagick / commit-hooks

Commit hooks based on experience, needs in teams I have worked, and acquired taste.
MIT License
0 stars 0 forks source link

Hook checking path and filenames #1

Open AFulgens opened 8 months ago

AFulgens commented 8 months ago

Context

Although in recent version of Windows 10 and on Windsows 11 the path length maximum 255 has been disabled, the old NTFS API still only supports that length, and thus many tools still don't come right with longer paths.

Apart from that, it's just nice not to have too long path names and not too long filenames (even if you are working on a Java project).

Note that a similar thing was discussed in https://github.com/pre-commit/pre-commit-hooks/issues/760 but it has been rejected there.

Idea

Create a pre-commit hook, which checks:

Both should be configurable via arguments.