-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy in spotless-conventions from instrumentation repo (#3554)
* Copy in spotless-conventions from instrumentation repo. * Reformat * A few more dotfiles
- Loading branch information
Anuraag Agrawal
authored
Aug 27, 2021
1 parent
12a8936
commit 6ef3091
Showing
44 changed files
with
471 additions
and
429 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id("com.diffplug.spotless") | ||
} | ||
|
||
spotless { | ||
java { | ||
googleJavaFormat() | ||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public|// Includes work from:)") | ||
target("src/**/*.java") | ||
} | ||
plugins.withId("groovy") { | ||
groovy { | ||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class)") | ||
} | ||
} | ||
plugins.withId("scala") { | ||
scala { | ||
scalafmt() | ||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)") | ||
target("src/**/*.scala") | ||
} | ||
} | ||
plugins.withId("org.jetbrains.kotlin.jvm") { | ||
kotlin { | ||
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) | ||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)") | ||
} | ||
} | ||
kotlinGradle { | ||
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) | ||
} | ||
format("misc") { | ||
// not using "**/..." to help keep spotless fast | ||
target( | ||
".gitattributes", | ||
".gitconfig", | ||
".editorconfig", | ||
"*.md", | ||
"src/**/*.md", | ||
"docs/**/*.md", | ||
"*.sh", | ||
"src/**/*.properties") | ||
indentWithSpaces() | ||
trimTrailingWhitespace() | ||
endWithNewline() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.