From 30c6828d9bc75c17cbd187bb5ecfdd11db4094ff Mon Sep 17 00:00:00 2001 From: david-perez Date: Tue, 13 Dec 2022 12:22:12 +0100 Subject: [PATCH] Run TODO lint against more files (#2078) This change would have prevented me from committing what was reverted in https://github.com/awslabs/smithy-rs/issues/2076 --- codegen-core/common-test-models/constraints.smithy | 7 ++----- tools/sdk-lints/src/todos.rs | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/codegen-core/common-test-models/constraints.smithy b/codegen-core/common-test-models/constraints.smithy index 3963f6f3ff..798b17b855 100644 --- a/codegen-core/common-test-models/constraints.smithy +++ b/codegen-core/common-test-models/constraints.smithy @@ -10,7 +10,6 @@ use smithy.framework#ValidationException @title("ConstraintsService") service ConstraintsService { operations: [ - // TODO Rename as {Verb}[{Qualifier}]{Noun}: https://github.com/awslabs/smithy-rs/pull/1342#discussion_r980936650 ConstrainedShapesOperation, ConstrainedHttpBoundShapesOperation, ConstrainedRecursiveShapesOperation, @@ -880,10 +879,8 @@ map LengthMap { @error("client") structure ErrorWithLengthStringMessage { - // TODO Doesn't work yet because constrained string types don't implement - // `AsRef`. - // @required - // message: LengthString + @required + message: LengthString } map MapOfMapOfListOfListOfConB { diff --git a/tools/sdk-lints/src/todos.rs b/tools/sdk-lints/src/todos.rs index 21b910bd4a..b1f59ca0a6 100644 --- a/tools/sdk-lints/src/todos.rs +++ b/tools/sdk-lints/src/todos.rs @@ -23,6 +23,13 @@ impl Lint for TodosHaveContext { extension .map(|ext| { ext.eq_ignore_ascii_case("rs") + || ext.eq_ignore_ascii_case("toml") + || ext.eq_ignore_ascii_case("txt") + // TODO(https://github.com/awslabs/smithy-rs/issues/2077) + // || ext.eq_ignore_ascii_case("md") + || ext.eq_ignore_ascii_case("sh") + || ext.eq_ignore_ascii_case("py") + || ext.eq_ignore_ascii_case("smithy") || ext.eq_ignore_ascii_case("kt") || ext.eq_ignore_ascii_case("kts") })