Unverified Commit 927fe303 authored by Zelda Hessler's avatar Zelda Hessler Committed by GitHub
Browse files

formatting: run code cleanup on entire project (#1993)

* formatting: run code cleanup on entire project

* revert: deletion of SdkSettings.defaultsConfigPath
parent 445b7fea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ internal class AwsSdkReadmeGenerator {
    private fun Element.normalizeLists() {
        (getElementsByTag("ul") + getElementsByTag("ol"))
            // Only operate on lists that are top-level (are not nested within other lists)
            .filter { list -> list.parents().none() { it.isList() } }
            .filter { list -> list.parents().none { it.isList() } }
            .forEach { list -> list.normalizeList() }
    }

+9 −6
Original line number Diff line number Diff line
@@ -20,15 +20,18 @@ class SdkSettings private constructor(private val awsSdk: ObjectNode?) {
    }

    /** Path to the `sdk-default-configuration.json` config file */
    val defaultsConfigPath: Path? get() =
    val defaultsConfigPath: Path?
        get() =
            awsSdk?.getStringMember("defaultConfigPath")?.orNull()?.value.let { Paths.get(it) }

    /** Path to the `sdk-endpoints.json` configuration */
    val endpointsConfigPath: Path? get() =
    val endpointsConfigPath: Path?
        get() =
            awsSdk?.getStringMember("endpointsConfigPath")?.orNull()?.value?.let { Paths.get(it) }

    /** Path to AWS SDK integration tests */
    val integrationTestPath: String get() =
    val integrationTestPath: String
        get() =
            awsSdk?.getStringMember("integrationTestPath")?.orNull()?.value ?: "aws/sdk/integration-tests"

    /** Version number of the `aws-config` crate */
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ import software.amazon.smithy.rust.codegen.core.smithy.customize.OperationCustom
import software.amazon.smithy.rust.codegen.core.smithy.customize.OperationSection
import software.amazon.smithy.rust.codegen.core.util.inputShape

class AccountIdAutofill() : OperationCustomization() {
class AccountIdAutofill : OperationCustomization() {
    override fun mutSelf(): Boolean = true
    override fun consumesSelf(): Boolean = false
    override fun section(section: OperationSection): Writable {
+2 −2
Original line number Diff line number Diff line
@@ -138,12 +138,12 @@ class ProtocolTestGenerator(
        testModuleWriter: RustWriter,
        block: Writable,
    ) {
        testModuleWriter.setNewlinePrefix("/// ")
        testModuleWriter.newlinePrefix = "/// "
        testCase.documentation.map {
            testModuleWriter.writeWithNoFormatting(it)
        }
        testModuleWriter.write("Test ID: ${testCase.id}")
        testModuleWriter.setNewlinePrefix("")
        testModuleWriter.newlinePrefix = ""
        TokioTest.render(testModuleWriter)
        val action = when (testCase) {
            is HttpResponseTestCase -> Action.Response
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ val SimpleShapes: Map<KClass<out Shape>, RustType> = mapOf(
data class SymbolVisitorConfig(
    val runtimeConfig: RuntimeConfig,
    val renameExceptions: Boolean,
    val nullabilityCheckMode: NullableIndex.CheckMode,
    val nullabilityCheckMode: CheckMode,
)

/**
Loading