Skip to content

Commit 6553c2e

Browse files
authored
Replace the full license text in each source file with SPDX tags (#50)
Also, configure SwiftLint to validate these file header comments
2 parents 816729f + d233271 commit 6553c2e

13 files changed

Lines changed: 28 additions & 242 deletions

File tree

.swiftlint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ disabled_rules:
1313
- explicit_self
1414
- explicit_top_level_acl
1515
- explicit_type_interface
16-
- file_header
1716
- file_name
1817
- file_types_order
1918
- force_unwrapping # FIXME
@@ -41,3 +40,8 @@ trailing_comma:
4140
line_length:
4241
ignores_function_declarations: true
4342
ignores_interpolated_strings: true
43+
44+
file_header:
45+
required_pattern: |
46+
\/\/ SPDX-FileCopyrightText: © (\d{4}|\d{4}-\d{4}) Matt Rubin and the Bases authors
47+
\/\/ SPDX-License-Identifier: MIT

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2019 Matt Rubin and the [Bases authors](AUTHORS.txt)
3+
Copyright © 2015-2026 Matt Rubin and the [Bases authors](AUTHORS.txt)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-FileCopyrightText: © 2016-2026 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
13
// swift-tools-version: 6.0
24

35
import PackageDescription

Sources/Base16/Alphabet.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// Alphabet.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2016-2018 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2016-2018 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
internal typealias Byte = UInt8
275
internal typealias EncodedChar = UInt8

Sources/Base16/Base16.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// Base16.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2016-2019 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2016-2022 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
import Foundation
275

Sources/Base32/Alphabet.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// Alphabet.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2015-2018 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2015-2018 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
internal typealias EncodedChar = UInt8
275

Sources/Base32/Base32.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// Base32.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2015-2019 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2015-2022 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
import Foundation
275

Sources/Base32/BlockDecoding.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// BlockDecoding.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2017-2018 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2017-2018 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
internal func decodeBlock(
275
_ c0: EncodedChar,

Sources/Base32/BlockEncoding.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// BlockEncoding.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2016-2019 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2016-2019 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
internal typealias EncodedBlock = (
275
EncodedChar, EncodedChar, EncodedChar, EncodedChar,

Sources/Base32/Quintets.swift

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
//
2-
// Quintets.swift
3-
// Bases
4-
//
5-
// Copyright (c) 2015-2018 Matt Rubin and the Bases authors
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy
8-
// of this software and associated documentation files (the "Software"), to deal
9-
// in the Software without restriction, including without limitation the rights
10-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
// copies of the Software, and to permit persons to whom the Software is
12-
// furnished to do so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
1+
// SPDX-FileCopyrightText: © 2015-2018 Matt Rubin and the Bases authors
2+
// SPDX-License-Identifier: MIT
253

264
typealias Byte = UInt8
275
typealias Quintet = UInt8

0 commit comments

Comments
 (0)