Skip to content

Commit f557442

Browse files
authored
misc: enable custom ktlint rules (#1405)
1 parent 7f69efb commit f557442

File tree

33 files changed

+173
-3
lines changed

33 files changed

+173
-3
lines changed

buildSrc/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
plugins {
27
`kotlin-dsl`
38
}

buildSrc/settings.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
rootProject.name = "buildSrc"
27

38
dependencyResolutionManagement {

buildSrc/src/main/kotlin/dokka-convention.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import kotlin.text.set
27

38
plugins {

codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/customization/RegionSupportTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.aws.customization
27

38
import org.junit.jupiter.api.Test

codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQueryTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.aws.protocols
27

38
import software.amazon.smithy.kotlin.codegen.test.*

codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1Test.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.aws.protocols
27

38
import software.amazon.smithy.kotlin.codegen.test.*

codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXmlTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.aws.protocols
27

38
import software.amazon.smithy.kotlin.codegen.test.*

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/checksums/HttpChecksumRequiredIntegration.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.rendering.checksums
27

38
import software.amazon.smithy.aws.traits.HttpChecksumTrait

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/smoketests/SmokeTestsIntegration.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.rendering.smoketests
27

38
import software.amazon.smithy.kotlin.codegen.KotlinSettings

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/smoketests/SmokeTestsRunnerGenerator.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package software.amazon.smithy.kotlin.codegen.rendering.smoketests
27

38
import software.amazon.smithy.codegen.core.Symbol
@@ -262,7 +267,11 @@ class SmokeTestsRunnerGenerator(
262267
statusOverride: String? = null,
263268
directive: String? = "",
264269
) {
265-
val expectation = if (errorExpected) "error expected from service" else "no error expected from service"
270+
val expectation = if (errorExpected) {
271+
"error expected from service"
272+
} else {
273+
"no error expected from service"
274+
}
266275
val status = statusOverride ?: "\$status"
267276
val testResult = "$status $service $testCase - $expectation $directive"
268277
writer.write("printer.appendLine(#S)", testResult)

0 commit comments

Comments
 (0)