From a038e7beed7ec47d8ff74f445a80cef039d25d3c Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 20 Feb 2024 20:13:32 -0500 Subject: [PATCH] docs: Extend license check to .rs files (#4428) --- bindings/rust/bench/benches/resumption.rs | 3 +++ bindings/rust/bench/src/bin/graph_memory.rs | 3 +++ codebuild/bin/copyright_mistake_scanner.sh | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bindings/rust/bench/benches/resumption.rs b/bindings/rust/bench/benches/resumption.rs index e98887521e0..3a7aaa32579 100644 --- a/bindings/rust/bench/benches/resumption.rs +++ b/bindings/rust/bench/benches/resumption.rs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + use bench::{ harness::TlsBenchConfig, CipherSuite, CryptoConfig, HandshakeType, KXGroup, S2NConnection, SigType, TlsConnPair, TlsConnection, diff --git a/bindings/rust/bench/src/bin/graph_memory.rs b/bindings/rust/bench/src/bin/graph_memory.rs index 0a28f6a284f..c633e69d7b9 100644 --- a/bindings/rust/bench/src/bin/graph_memory.rs +++ b/bindings/rust/bench/src/bin/graph_memory.rs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + use plotters::{ prelude::{ ChartBuilder, IntoDrawingArea, IntoSegmentedCoord, LabelAreaPosition, Rectangle, diff --git a/codebuild/bin/copyright_mistake_scanner.sh b/codebuild/bin/copyright_mistake_scanner.sh index 662d7a0236f..0d3e1b1688c 100755 --- a/codebuild/bin/copyright_mistake_scanner.sh +++ b/codebuild/bin/copyright_mistake_scanner.sh @@ -20,12 +20,14 @@ S2N_FILES+=" " S2N_FILES+=$(find "$PWD"/codebuild/ -type f -name "*.sh") S2N_FILES+=" " S2N_FILES+=$(find "$PWD"/tests/ -type f -name "*.sh") +S2N_FILES+=" " +S2N_FILES+=$(find "$PWD" -type f -name "*.rs" | grep -v target) FAILED=0 for file in $S2N_FILES; do - # The word "Copyright" should appear at least once in the first 3 lines of every file - COUNT=`head -3 $file | grep "Copyright" | wc -l`; + # The word "Copyright" should appear at least once in the first 4 lines of every file + COUNT=`head -4 $file | grep "Copyright" | wc -l`; if [ "$COUNT" == "0" ]; then FAILED=1;