Skip to content

Hook checking path and filenames #1

Open

Description

@AFulgens

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 pre-commit/pre-commit-hooks#760 but it has been rejected there.

Idea

Create a pre-commit hook, which checks:

  • absolute path length (by default should not be longer than 255 characters)
  • filename length (by default, without optional extension, should not be longer than 32 characters)

Both should be configurable via arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions