From 830fc2d8f700d8ec256298734131f5d09b59adf4 Mon Sep 17 00:00:00 2001 From: Aaron Todd Date: Mon, 14 Aug 2023 17:07:03 -0400 Subject: [PATCH] chore: use custom ktlint-rules from repo tools (#1018) --- .../sdk/kotlin/codegen/ServiceClientCompanionObjectWriter.kt | 4 ++++ .../sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt | 5 ++--- .../customization/s3/TruncatablePaginationIntegration.kt | 4 ++++ .../test/kotlin/aws/sdk/kotlin/codegen/testutil/ModelUtil.kt | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/ServiceClientCompanionObjectWriter.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/ServiceClientCompanionObjectWriter.kt index e2e84569b..2f042a5f8 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/ServiceClientCompanionObjectWriter.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/ServiceClientCompanionObjectWriter.kt @@ -1,3 +1,7 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ package aws.sdk.kotlin.codegen import software.amazon.smithy.kotlin.codegen.core.KotlinWriter diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt index 8c1801022..59da5af1a 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt @@ -29,9 +29,8 @@ class S3SigningConfig : KotlinIntegration { override fun enabledForService(model: Model, settings: KotlinSettings) = model.expectShape(settings.service).isS3 - override fun authSchemes(ctx: ProtocolGenerator.GenerationContext): List { - return listOf(S3AuthSchemeHandler()) - } + override fun authSchemes(ctx: ProtocolGenerator.GenerationContext): List = + listOf(S3AuthSchemeHandler()) } private class S3AuthSchemeHandler : SigV4AuthSchemeHandler() { diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/TruncatablePaginationIntegration.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/TruncatablePaginationIntegration.kt index 8df1efcb2..566f161e9 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/TruncatablePaginationIntegration.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/TruncatablePaginationIntegration.kt @@ -1,3 +1,7 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ package aws.sdk.kotlin.codegen.customization.s3 import software.amazon.smithy.kotlin.codegen.KotlinSettings diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/testutil/ModelUtil.kt b/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/testutil/ModelUtil.kt index 8c7f0ad77..1c7fd39de 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/testutil/ModelUtil.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/testutil/ModelUtil.kt @@ -1,3 +1,7 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ package aws.sdk.kotlin.codegen.testutil import software.amazon.smithy.kotlin.codegen.test.prependNamespaceAndService