diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index 1df47f9d8177d89e2a7d1f4c020368377b99bdac..2b811882c459a59802846131290edfce6db26db1 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -74,4 +74,4 @@ aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client", fe all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-endpoint/Cargo.toml b/aws/rust-runtime/aws-endpoint/Cargo.toml index a1a1cfb2e35b0f0b0cbe55c9fa6c1d4f7aba8c29..ac5446817e3a3748d6cfc3bf1dd18f0e855a9f05 100644 --- a/aws/rust-runtime/aws-endpoint/Cargo.toml +++ b/aws/rust-runtime/aws-endpoint/Cargo.toml @@ -18,4 +18,4 @@ tracing = "0.1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-http/Cargo.toml b/aws/rust-runtime/aws-http/Cargo.toml index ae48238812f17d060bd180a228031c6e38a17074..16b10c949b7ef7895df418b09d8e600df7af11ca 100644 --- a/aws/rust-runtime/aws-http/Cargo.toml +++ b/aws/rust-runtime/aws-http/Cargo.toml @@ -27,4 +27,4 @@ tracing-subscriber = { version = "0.2.16", features = ["fmt"] } all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-hyper/Cargo.toml b/aws/rust-runtime/aws-hyper/Cargo.toml index 97232bc4f96f56440fb238c5a450bbec6ce6c0f6..d6f386a66cf19a7b359b09c0e79751b32fb7b824 100644 --- a/aws/rust-runtime/aws-hyper/Cargo.toml +++ b/aws/rust-runtime/aws-hyper/Cargo.toml @@ -46,4 +46,4 @@ name = "e2e_test" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 527db7d1cd3bd44ddb221e807def029c4560b9a2..ee24c69f1274a4de40c2cb8ac9549c1030e0bdfb 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -34,4 +34,4 @@ temp-file = "0.1.6" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-sig-auth/Cargo.toml b/aws/rust-runtime/aws-sig-auth/Cargo.toml index da263b13696b6784f4bde11ecad6b085a1e74b56..843a6909555d1add6ae8e7d2cd0dfdd8c5109d36 100644 --- a/aws/rust-runtime/aws-sig-auth/Cargo.toml +++ b/aws/rust-runtime/aws-sig-auth/Cargo.toml @@ -30,4 +30,4 @@ tracing-test = "0.1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-sigv4/Cargo.toml b/aws/rust-runtime/aws-sigv4/Cargo.toml index dde7a13661debd3ae090ac16f70e106ce33c4b5d..ef421c065abf82715a766c1280582e4e98bc23c3 100644 --- a/aws/rust-runtime/aws-sigv4/Cargo.toml +++ b/aws/rust-runtime/aws-sigv4/Cargo.toml @@ -37,4 +37,4 @@ time = { version = "0.3.4", features = ["parsing"] } all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/aws/rust-runtime/aws-types/Cargo.toml b/aws/rust-runtime/aws-types/Cargo.toml index 999b84b0d38132bef5719b29617260068356903e..1970c1975e87ac3f5ba33f7b6b1d551b701893b7 100644 --- a/aws/rust-runtime/aws-types/Cargo.toml +++ b/aws/rust-runtime/aws-types/Cargo.toml @@ -28,4 +28,4 @@ rustc_version = "0.4.0" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-async/Cargo.toml b/rust-runtime/aws-smithy-async/Cargo.toml index 6a07599470d0ca069138a30a844d1cf7980f053e..e20e1acabd82fdec9d5c4f4142037ce676711b38 100644 --- a/rust-runtime/aws-smithy-async/Cargo.toml +++ b/rust-runtime/aws-smithy-async/Cargo.toml @@ -23,4 +23,4 @@ futures-util = "0.3.16" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-client/Cargo.toml b/rust-runtime/aws-smithy-client/Cargo.toml index 2c8b79fae88d758e353381c2f79712560c5aa0d0..11c0c358f2157847beeb2a83f04291d0866ceaea 100644 --- a/rust-runtime/aws-smithy-client/Cargo.toml +++ b/rust-runtime/aws-smithy-client/Cargo.toml @@ -47,4 +47,4 @@ serde_json = "1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-eventstream/Cargo.toml b/rust-runtime/aws-smithy-eventstream/Cargo.toml index d9ef8e4b2d2422c211d0625c8f25f461b4847dba..057c27caceb74f948292e22a7fdd304784530348 100644 --- a/rust-runtime/aws-smithy-eventstream/Cargo.toml +++ b/rust-runtime/aws-smithy-eventstream/Cargo.toml @@ -24,4 +24,4 @@ bytes-utils = "0.1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-http-server/Cargo.toml b/rust-runtime/aws-smithy-http-server/Cargo.toml index 8d67d157c707b459022d0bdfccf6a326960a47b3..42644c5f3b4cd280ad9a9a7106fe9768585b422a 100644 --- a/rust-runtime/aws-smithy-http-server/Cargo.toml +++ b/rust-runtime/aws-smithy-http-server/Cargo.toml @@ -42,4 +42,4 @@ pretty_assertions = "1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-http-tower/Cargo.toml b/rust-runtime/aws-smithy-http-tower/Cargo.toml index 9843ab89958d6d0e9eb68ba2948c8bdcebef228d..8f950cefe006e9adeac699066ea86fc9e1ad6b98 100644 --- a/rust-runtime/aws-smithy-http-tower/Cargo.toml +++ b/rust-runtime/aws-smithy-http-tower/Cargo.toml @@ -24,4 +24,4 @@ tokio = { version = "1", features = ["full"]} all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-http/Cargo.toml b/rust-runtime/aws-smithy-http/Cargo.toml index efe918772f9c8448365cf6c5e8f4141c30583736..e71a6393b19aeef2ead91d72dd25d66ac333da08 100644 --- a/rust-runtime/aws-smithy-http/Cargo.toml +++ b/rust-runtime/aws-smithy-http/Cargo.toml @@ -44,4 +44,4 @@ tempfile = "3.2.0" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-json/Cargo.toml b/rust-runtime/aws-smithy-json/Cargo.toml index b0a3981216571fcbba5a3cf070592d405a95007d..44c4edd64b8b171db4db0799580d209933f69c03 100644 --- a/rust-runtime/aws-smithy-json/Cargo.toml +++ b/rust-runtime/aws-smithy-json/Cargo.toml @@ -18,4 +18,4 @@ serde_json = "1.0" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-protocol-test/Cargo.toml b/rust-runtime/aws-smithy-protocol-test/Cargo.toml index 47d1503d550f5661db2fc2715ffff6731f07995f..192beba34bc7df93cf9c8a4bad62b444ba806cdf 100644 --- a/rust-runtime/aws-smithy-protocol-test/Cargo.toml +++ b/rust-runtime/aws-smithy-protocol-test/Cargo.toml @@ -22,4 +22,4 @@ roxmltree = "0.14.1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-query/Cargo.toml b/rust-runtime/aws-smithy-query/Cargo.toml index fbbb44845accd9401c9760d2082421b172751503..f4e1b5dfb67f60c26ff5f596a9b5c2b0124263dc 100644 --- a/rust-runtime/aws-smithy-query/Cargo.toml +++ b/rust-runtime/aws-smithy-query/Cargo.toml @@ -15,4 +15,4 @@ urlencoding = "1.3" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-types-convert/Cargo.toml b/rust-runtime/aws-smithy-types-convert/Cargo.toml index 0490f5ce09bf6b4bebb1a66d3d116f21d9911a91..6332999ee32ff16a4e4b4739624d25f0b86212f5 100644 --- a/rust-runtime/aws-smithy-types-convert/Cargo.toml +++ b/rust-runtime/aws-smithy-types-convert/Cargo.toml @@ -21,4 +21,4 @@ time = { version = "0.3.4", optional = true } all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-types/Cargo.toml b/rust-runtime/aws-smithy-types/Cargo.toml index 1fbd70494d06180034bde0944a5eb59bce1d563d..2e4f88127e1c2e3406d7f86c004221254bf06e34 100644 --- a/rust-runtime/aws-smithy-types/Cargo.toml +++ b/rust-runtime/aws-smithy-types/Cargo.toml @@ -24,4 +24,4 @@ serde_json = "1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/aws-smithy-xml/Cargo.toml b/rust-runtime/aws-smithy-xml/Cargo.toml index 93d2c784937a2f54ad7f14e2263aa469cb634217..73c20c0969fb6ef003315a2452d8751308bc9313 100644 --- a/rust-runtime/aws-smithy-xml/Cargo.toml +++ b/rust-runtime/aws-smithy-xml/Cargo.toml @@ -20,4 +20,4 @@ proptest = "1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/rust-runtime/inlineable/Cargo.toml b/rust-runtime/inlineable/Cargo.toml index 41524a40e356b4ce9c92edd31f5f761ab94125f3..ca211698f5b15119bf25467e549513a34253d851 100644 --- a/rust-runtime/inlineable/Cargo.toml +++ b/rust-runtime/inlineable/Cargo.toml @@ -27,4 +27,4 @@ regex = "1" all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] -# End of doc.rs metadata +# End of docs.rs metadata diff --git a/tools/sdk-lints/src/lint_cargo_toml.rs b/tools/sdk-lints/src/lint_cargo_toml.rs index 07aa54101072524a1b39ab5ea12ceef2e66fc52b..09b2b8dde3ed0e208f2f093e6cdb2a11dd5b4d8b 100644 --- a/tools/sdk-lints/src/lint_cargo_toml.rs +++ b/tools/sdk-lints/src/lint_cargo_toml.rs @@ -39,7 +39,8 @@ struct Metadata { rustdoc_args: Vec, } -const RUST_TEAM: &str = "AWS Rust SDK Team "; +const RUST_SDK_TEAM: &str = "AWS Rust SDK Team "; +const SERVER_TEAM: &str = "Smithy Rust Server "; const SERVER_CRATES: &[&str] = &["aws-smithy-http-server"]; /// Check crate licensing @@ -78,23 +79,25 @@ pub(crate) fn check_crate_author(path: impl AsRef) -> Result<()> { Some(package) => package, None => bail!("missing `[package]` section"), }; - if SERVER_CRATES.contains(&package.name.as_str()) { - return Ok(()); - } - if !package.authors.iter().any(|s| s == RUST_TEAM) { + let expected_author = if SERVER_CRATES.contains(&package.name.as_str()) { + SERVER_TEAM + } else { + RUST_SDK_TEAM + }; + if !package.authors.iter().any(|s| s == expected_author) { bail!( "missing `{}` in package author list ({:?})", - RUST_TEAM, + expected_author, package.authors ) } Ok(()) } -/// Check docsrs for a Cargo.toml +/// Check Cargo.toml for a valid docs.rs metadata section /// /// This function validates: -/// - it is valid TOMl +/// - it is valid TOML /// - it contains a package.metadata.docs.rs section /// - All of the standard docs.rs settings are respected pub(crate) fn check_docs_rs(path: impl AsRef) -> Result<()> { @@ -134,7 +137,7 @@ pub(crate) fn fix_docs_rs(path: impl AsRef) -> Result { let mut cargo_toml = read_to_string(path.as_ref()).context("failed to read Cargo.toml")?; let updated = replace_anchor( &mut cargo_toml, - &("[package.metadata.docs.rs]", "# End of doc.rs metadata"), + &("[package.metadata.docs.rs]", "# End of docs.rs metadata"), DEFAULT_DOCS_RS_SECTION, )?; if updated {