Cosium / git-code-format-maven-plugin

A maven plugin that automatically deploys code formatters as pre-commit git hook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-commit hook format fails on windows due to line separator characters.

sohansoni opened this issue · comments

On committing a .java file on windows machine (via intellij) I am getting below error.

[ERROR] Failed to execute goal com.cosium.code:git-code-format-maven-plugin:3.3:on-pre-commit (default-cli) on project <project folder>: org.eclipse.jgit.api.errors.PatchApplyException: Cannot apply: HunkHeader[63,5->63,4] -> [Help 1]

If I change Line Seperator from 'LF' to 'CRLF', pre commit hooks works fine. But I dont want to this for all the files all the time.
I see similar issue (#26) was reported and closed by you. But with the latest version 3.3, I am still facing this issue.

Why did you skip the bug template? Use the bug template please.