-
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 2.0 (#1877)
### What's done: - updated examples. It's part of #1793
- Loading branch information
Showing
20 changed files
with
124 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
1 change: 0 additions & 1 deletion
1
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,3 @@ | ||
plugins { | ||
kotlin("jvm") | ||
id("com.saveourtool.diktat.diktat-gradle-plugin") | ||
} |
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
3 changes: 3 additions & 0 deletions
3
examples/gradle-kotlin-dsl-multiproject/frontend/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
kotlin("jvm") | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/gradle-kotlin-dsl-multiproject/frontend/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 | ||
} |
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 +1,2 @@ | ||
include(":backend") | ||
include(":frontend") |
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
Empty file.
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.saveourtool.diktat</groupId> | ||
<artifactId>diktat-examples-maven-multiproject</artifactId> | ||
<version>0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<artifactId>backend</artifactId> | ||
</project> |
File renamed without changes.
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.saveourtool.diktat</groupId> | ||
<artifactId>diktat-examples-maven-multiproject</artifactId> | ||
<version>0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<artifactId>frontend</artifactId> | ||
</project> |
13 changes: 0 additions & 13 deletions
13
examples/maven-multiproject/frontend/src/main/kotlin/AnotherMain.kt
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
examples/maven-multiproject/frontend/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 | ||
} |
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 | ||
|
||
} |