pre-commit-hooks icon indicating copy to clipboard operation
pre-commit-hooks copied to clipboard

Insert license and top-of-file whitespace

Open Wheest opened this issue 3 weeks ago • 0 comments

Unsure if this is intended behavior, but I had a C file with 2 lines of whitespace a the top:

[whitespace]
[whitespace]
/* Some comment */

int main() {
  return 0;
}

The insert-license hook inserts the license after this whitespace:

[whitespace]
[whitespace]
// Licenced under FooBar

/* Some comment  */

int main() {
  return 0;
}

I would have expected it to be inserted after.

Wheest avatar Dec 17 '25 14:12 Wheest