From a2da193d075a3ee952239edd1d68bb9cd09cdb7f Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 21 Dec 2021 19:08:15 +0100 Subject: [PATCH] xtask: Obfuscate SPDX tags in xtask code ... to stop the reuse tool from getting confused. --- xtask/src/license_headers_check.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xtask/src/license_headers_check.rs b/xtask/src/license_headers_check.rs index 02431cea98a..a051d948145 100644 --- a/xtask/src/license_headers_check.rs +++ b/xtask/src/license_headers_check.rs @@ -125,9 +125,9 @@ fn test_license_tag_c_style() { let source = format!( r#"// Copyright © something foobar -// SPDX-License-Identifier: {} +// SP{}-License-Identifier: {} blah"#, - EXPECTED_SPDX_EXPRESSION + "DX", EXPECTED_SPDX_EXPRESSION ); let test_source = SourceFileWithTags::new(&source, &style); assert_eq!( @@ -142,10 +142,10 @@ blah"# let source = format!( r#"// Copyright © something foobar -// SPDX-License-Identifier: {} +// SP{}-License-Identifier: {} blah"#, - EXPECTED_SPDX_EXPRESSION + "DX", EXPECTED_SPDX_EXPRESSION ); let test_source = SourceFileWithTags::new(&source, &style); assert_eq!( @@ -194,10 +194,10 @@ fn test_license_tag_hash() { let source = format!( r#"# Copyright © something foobar -# SPDX-License-Identifier: {} +# SP{}-License-Identifier: {} blah"#, - EXPECTED_SPDX_EXPRESSION + "DX", EXPECTED_SPDX_EXPRESSION ); let test_source = SourceFileWithTags::new(&source, &style); assert_eq!( @@ -227,10 +227,10 @@ fn test_license_tag_dotdot() { let source = format!( r#".. Copyright © something foobar -.. SPDX-License-Identifier: {} +.. SP{}-License-Identifier: {} blah"#, - EXPECTED_SPDX_EXPRESSION + "DX", EXPECTED_SPDX_EXPRESSION ); let test_source = SourceFileWithTags::new(&source, &style); assert_eq!( @@ -338,7 +338,7 @@ impl<'a> LicenseHeader<'a> { const EXPECTED_SPDX_EXPRESSION: &str = "(GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)"; const EXPECTED_SPDX_ID: &str = - const_format::concatcp!("SPDX-License-Identifier: ", EXPECTED_SPDX_EXPRESSION); + const_format::concatcp!("SP", "DX-License-Identifier: ", EXPECTED_SPDX_EXPRESSION); // Do not confuse the reuse tool const EXPECTED_HEADER: LicenseHeader<'static> = LicenseHeader(&["Copyright © SixtyFPS GmbH ", EXPECTED_SPDX_ID]);