Lucas-C / pre-commit-hooks

git pre-commit hooks

Home Page:http://pre-commit.com/hooks.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

insert license: support for using tabs instead of spaces

benthevining opened this issue · comments

In the insert-license hook, it would be great if these was an option for using tabs to indent instead of spaces.

Thanks!

Hi @benthevining!
Could you please be more specific?
The insert-license hook makes no distinction between spaces & tabs.

If I want the comment prefix in C++ multiline comments to be blank, ie:

- repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.1.10
    hooks:
      - id: insert-license
        name: "Insert license header in C++ source files"
        args: [--license-filepath=util/lemons_header.txt,
               '--comment-style=/*|  | */',
               --detect-license-in-X-top-lines=16]

then the license header seems to be indented using space characters. This isn't a super pressing issue, though, I can live with using * as the comment prefix for now.

Thank you!!!

Released in v1.1.11