Skip to content

Commit 5b452f3

Browse files
committed
chore(license-fact-providers): Put an extension property before a function
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 08e631b commit 5b452f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/license-fact-providers/scancode/src/main/kotlin/ScanCodeLicenseFactProvider.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ class ScanCodeLicenseFactProvider(
132132
override fun hasLicenseText(licenseId: String): Boolean = getLicenseTextFile(licenseId) != null
133133
}
134134

135+
private val File.isNotBlank: Boolean
136+
get() = useLines { lines -> lines.skipYamlFrontMatter().any { line -> line.any { !it.isWhitespace() } } }
137+
135138
internal fun Sequence<String>.skipYamlFrontMatter(): Sequence<String> {
136139
var inFrontMatter = false
137140

@@ -149,6 +152,3 @@ internal fun Sequence<String>.skipYamlFrontMatter(): Sequence<String> {
149152
it.isBlank()
150153
}
151154
}
152-
153-
private val File.isNotBlank: Boolean
154-
get() = useLines { lines -> lines.skipYamlFrontMatter().any { line -> line.any { !it.isWhitespace() } } }

0 commit comments

Comments
 (0)