Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git setting of line endings are not fetched from gitconfig file in git home folder #2342

Open
5 tasks done
robert-istvan opened this issue Nov 15, 2024 · 0 comments
Open
5 tasks done

Comments

@robert-istvan
Copy link

  • summary of problem
    My C:\Program Files\Git\etc\gitconfig file has a [core] autocrlf = input setting but this parameter is not defined in $HOME/.gitconfig.
    kotlin, kotlinGradle, groovy, shell, json, yaml, format("markdown"), format("text") has a problem with LF line ending and fixes to CRLF. Java is not effected.
    If [core] autocrlf = input set in $HOME/.gitconfig, spotless works well.
  • Gradle or Maven version
    Gradle 8.11
  • spotless version
    6.25
  • operating system and version
    Win 11
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
    spotless { java { target("**/*.java") targetExclude(defaultExcludes) googleJavaFormat(libs["google-java-format"].version) .reflowLongStrings() .formatJavadoc(true) targetExclude(defaultExcludes) } kotlin { target("**/*.kt") targetExclude(defaultExcludes) ktfmt(libs["ktfmt"].version).googleStyle() } kotlinGradle { ktfmt(libs["ktfmt"].version).googleStyle() targetExclude(defaultExcludes) } groovy { target("**/*.groovy", "Jenkinsfile", "**/Jenkinsfile.*") targetExclude(defaultExcludes) trimTrailingWhitespace() endWithNewline() } shell { target("**/*.sh", "src/main/sh/**/*") targetExclude(defaultExcludes) localPrettier(libs["prettier"], libs["prettier-sh"]) .config( mapOf( "plugins" to listOf("prettier-plugin-sh"), "parser" to "sh", *prettierDefaults ) ) trimTrailingWhitespace() endWithNewline() } json { target("**/*.json", "**/*.json5") targetExclude(defaultExcludes) localPrettier(libs["prettier"]) .config(mapOf(*prettierDefaults)) } yaml { target("**/*.yaml", "**/*.yml") targetExclude(defaultExcludes) localPrettier(libs["prettier"]) .config(mapOf(*prettierDefaults)) } format("markdown") { target("**/*.md") targetExclude(defaultExcludes) localPrettier(libs["prettier"]) .config(mapOf(*prettierDefaults)) } format("text") { target( "**/.gitattributes", "**/.gitignore", "**/.npmrc", "**/.sdkmanrc", "**/*.properties", "Dockerfile", "**/*.txt", "**/*.config" ) targetExclude(defaultExcludes) trimTrailingWhitespace() endWithNewline() indentWithSpaces(2) } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants