-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated examples for diktat release 2.0.0
### What's done: - updated examples.
- Loading branch information
Showing
15 changed files
with
89 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package whate.ver | ||
|
||
fun String.createPluginConfig() { | ||
val pluginConfig = TomlDecoder.decode<T>( | ||
serializer(), | ||
fakeFileNode, | ||
DecoderConf() | ||
) | ||
pluginConfig.configLocation = this.toPath() | ||
pluginConfig.prop1 = property1 | ||
// comment1 | ||
pluginConfig.configLocation2 = this.toPath() | ||
// comment2 | ||
pluginConfig.prop2 = property2 | ||
} |
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
2 changes: 1 addition & 1 deletion
2
examples/gradle-kotlin-dsl-multiproject/backend/build.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
plugins { | ||
kotlin("jvm") | ||
id("com.saveourtool.diktat.diktat-gradle-plugin") | ||
id("com.saveourtool.diktat") version "2.0.0" | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/gradle-kotlin-dsl-multiproject/backend/src/main/kotlin/AnotherTest.kt
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,15 @@ | ||
package whate.ver | ||
|
||
fun String.createPluginConfig() { | ||
val pluginConfig = TomlDecoder.decode<T>( | ||
serializer(), | ||
fakeFileNode, | ||
DecoderConf() | ||
) | ||
pluginConfig.configLocation = this.toPath() | ||
pluginConfig.prop1 = property1 | ||
// comment1 | ||
pluginConfig.configLocation2 = this.toPath() | ||
// comment2 | ||
pluginConfig.prop2 = property2 | ||
} |
14 changes: 7 additions & 7 deletions
14
examples/gradle-kotlin-dsl-multiproject/backend/src/main/kotlin/Test.kt
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package incorrect | ||
|
||
class incorrectname: Exception { | ||
fun INCORRECT_FUNCTION() { | ||
throw Exception() | ||
} | ||
class incorrectname: Exception() { | ||
fun INCORRECT_FUNCTION() { | ||
throw Exception() | ||
} | ||
|
||
// fun myCommentedFunction() { | ||
// } | ||
// fun myCommentedFunction() { | ||
// } | ||
|
||
val Incorrect_Val = 5 | ||
val Incorrect_Val = 5 | ||
|
||
} |
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
15 changes: 15 additions & 0 deletions
15
examples/maven-multiproject/backend/src/main/kotlin/AnotherTest.kt
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,15 @@ | ||
package whate.ver | ||
|
||
fun String.createPluginConfig() { | ||
val pluginConfig = TomlDecoder.decode<T>( | ||
serializer(), | ||
fakeFileNode, | ||
DecoderConf() | ||
) | ||
pluginConfig.configLocation = this.toPath() | ||
pluginConfig.prop1 = property1 | ||
// comment1 | ||
pluginConfig.configLocation2 = this.toPath() | ||
// comment2 | ||
pluginConfig.prop2 = property2 | ||
} |
File renamed without changes.
13 changes: 0 additions & 13 deletions
13
examples/maven-multiproject/frontend/src/main/kotlin/AnotherMain.kt
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package whate.ver | ||
|
||
fun String.createPluginConfig() { | ||
val pluginConfig = TomlDecoder.decode<T>( | ||
serializer(), | ||
fakeFileNode, | ||
DecoderConf() | ||
) | ||
pluginConfig.configLocation = this.toPath() | ||
pluginConfig.prop1 = property1 | ||
// comment1 | ||
pluginConfig.configLocation2 = this.toPath() | ||
// comment2 | ||
pluginConfig.prop2 = property2 | ||
} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package incorrect | ||
|
||
class incorrectname: Exception() { | ||
fun INCORRECT_FUNCTION() { | ||
throw Exception() | ||
} | ||
fun INCORRECT_FUNCTION() { | ||
throw Exception() | ||
} | ||
|
||
// fun myCommentedFunction() { | ||
// } | ||
// fun myCommentedFunction() { | ||
// } | ||
|
||
val Incorrect_Val = 5 | ||
val Incorrect_Val = 5 | ||
|
||
} |