File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
analyzer/src/main/kotlin/managers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ class Pip(
170
170
}
171
171
172
172
companion object {
173
+ private const val SHORT_STRING_MAX_CHARS = 200
174
+
173
175
private val INSTALL_OPTIONS = arrayOf(
174
176
" --no-warn-conflicts" ,
175
177
" --prefer-binary"
@@ -437,7 +439,9 @@ class Pip(
437
439
}
438
440
439
441
private fun getLicenseFromLicenseField (value : String? ): String? {
440
- if (value.isNullOrBlank() || value == " UNKNOWN" || " \n " in value) return null
442
+ if (value.isNullOrBlank() || value == " UNKNOWN" || value.length > SHORT_STRING_MAX_CHARS || " \n " in value) {
443
+ return null
444
+ }
441
445
442
446
// Apply a work-around for projects that declare licenses in classifier-syntax in the license field.
443
447
return getLicenseFromClassifier(value) ? : value
You can’t perform that action at this time.
0 commit comments