Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
Description
Every `.kt` file fails with the following error due to the `autoStyleKotlin` check.
> Task :buildSrc:autostyleKotlinGradleCheck FAILED > Task :buildSrc:buildext:autostyleKotlinCheck FAILED > Task :buildSrc:fmpp:autostyleKotlinCheck FAILED > Task :buildSrc:javacc:autostyleKotlinCheck FAILED FAILURE: Build completed with 4 failures. Task failed with an exception. ----------- * What went wrong: Execution failed for task ':buildSrc:buildext:autostyleKotlinCheck'. > The following files have format violations: subprojects/buildext/src/main/kotlin/org/apache/calcite/buildtools/buildext/BuildExtPlugin.kt @@ -1,27 +1,27 @@ -/*␍␊ -·*·Licensed·to·the·Apache·Software·Foundation·(ASF)·under·one·or·more␍␊ -·*·contributor·license·agreements.··See·the·NOTICE·file·distributed·with␍␊ -·*·this·work·for·additional·information·regarding·copyright·ownership.␍␊ -·*·The·ASF·licenses·this·file·to·You·under·the·Apache·License,·Version·2.0␍␊ -·*·(the·"License");·you·may·not·use·this·file·except·in·compliance·with␍␊ -·*·the·License.··You·may·obtain·a·copy·of·the·License·at␍␊ -·*␍␊ -·*···http://www.apache.org/licenses/LICENSE-2.0␍␊ -·*␍␊ -·*·Unless·required·by·applicable·law·or·agreed·to·in·writing,·software␍␊ -·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS,␍␊ -·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied.␍␊ -·*·See·the·License·for·the·specific·language·governing·permissions·and␍␊ -·*·limitations·under·the·License.␍␊ -·*␍␊ -·*/␍␊ -␍␊ -package·org.apache.calcite.buildtools.buildext␍␊ -␍␊ -import·org.gradle.api.Plugin␍␊ -import·org.gradle.api.Project␍␊ -␍␊ -class·BuildExtPlugin·:·Plugin<Project>·{␍␊ -····override·fun·apply(target:·Project)·{␍␊ -····}␍␊ -}␍␊ +/*␊ +·*·Licensed·to·the·Apache·Software·Foundation·(ASF)·under·one·or·more␊ +·*·contributor·license·agreements.··See·the·NOTICE·file·distributed·with␊ +·*·this·work·for·additional·information·regarding·copyright·ownership.␊ +·*·The·ASF·licenses·this·file·to·You·under·the·Apache·License,·Version·2.0␊ +·*·(the·"License");·you·may·not·use·this·file·except·in·compliance·with␊ +·*·the·License.··You·may·obtain·a·copy·of·the·License·at␊ +·*␊ +·*···http://www.apache.org/licenses/LICENSE-2.0␊ +·*␊ +·*·Unless·required·by·applicable·law·or·agreed·to·in·writing,·software␊ +·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS,␊ +·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied.␊ +·*·See·the·License·for·the·specific·language·governing·permissions·and␊ +·*·limitations·under·the·License.␊ +·*␊ +·*/␊ +␊ +package·org.apache.calcite.buildtools.buildext␊ +␊ +import·org.gradle.api.Plugin␊ ... (6 more lines that didn't fit) Violations also present in: subprojects/buildext/src/main/kotlin/org/apache/calcite/buildtools/buildext/dsl/ParenthesisBalancer.kt Run './gradlew autostyleApply' to fix the violations.
The fix to this is to modify the .gitattributes file to set eol=clrf to *.kt and *.kts. See attached PR.
Attachments
Issue Links
- links to