Skip to content

Commit f9b8f15

Browse files
authored
Remove extra whitespace when generating license header for linux tests (#1913)
Motivation: The soundness check is failing because of the generated year range is not as it should be. Moreover when re-generating the linux tests for the length prefix tests (which are failing soundness) the generated header has extra whitespace before the year; this also fails the soundness check. Modifications: - Strip whitespace from the copyright year range generated for linux tests - Re-generate the test manifest for ByteBufferLengthPrefixTests Result: - Soundness is happier
1 parent 906d5c5 commit f9b8f15

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Tests/NIOTests/ByteBufferLengthPrefixTests+XCTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the SwiftNIO open source project
44
//
5-
// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors
5+
// Copyright (c) 2021 Apple Inc. and the SwiftNIO project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information

scripts/generate_linux_tests.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def extractCopyright(log)
6363
if Integer(year) < startYear
6464
startYear = Integer(year)
6565
end
66-
66+
6767
end
6868

6969
# If the years end up being the same
@@ -76,7 +76,7 @@ def extractCopyright(log)
7676

7777
def header(fileName)
7878
log = %x(git log --follow -p #{fileName})
79-
copyrightYears = extractCopyright(log)
79+
copyrightYears = extractCopyright(log).strip
8080

8181
string = <<-eos
8282
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)