Skip to content

Commit e2c15c5

Browse files
committed
Look for copyright header only in *.kt files
1 parent 7549963 commit e2c15c5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The CI pipeline will fail if code is not properly formatted.
3434

3535
### 2. Copyright Headers
3636

37-
All `.kt` and `.kts` files must include the MIT license header at the top:
37+
All `.kt` files must include the MIT license header at the top:
3838

3939
```kotlin
4040
/*
@@ -49,7 +49,7 @@ Running `./gradlew spotlessApply` automatically adds this header to any files mi
4949

5050
**Why copyright headers matter:** Including copyright headers on all source files helps avoid potential legal issues and keeps this library clean to use for both personal and commercial applications. The MIT license identifier makes licensing terms explicit and unambiguous.
5151

52-
The CI pipeline includes a copyright check that will fail if any Kotlin files are missing the required header.
52+
The CI pipeline includes a copyright check that will fail if any `.kt` files are missing the required header.
5353

5454
## Automated Git Hooks (Recommended)
5555

scripts/check-copyright.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Check for missing MIT copyright headers in Kotlin files
3+
# Check for missing MIT copyright headers in Kotlin source files
44
# Returns 0 if all files have headers, 1 if any are missing
55

66
MISSING_FILES=()
@@ -9,7 +9,7 @@ while IFS= read -r file; do
99
if ! grep -q "SPDX-License-Identifier: MIT" "$file"; then
1010
MISSING_FILES+=("$file")
1111
fi
12-
done < <(find . -type f \( -name "*.kt" -o -name "*.kts" \) \
12+
done < <(find . -type f -name "*.kt" \
1313
-not -path "*/build/*" \
1414
-not -path "*/.gradle/*")
1515

0 commit comments

Comments
 (0)