improve code formatting for detekt score

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2023-09-20 23:07:44 +02:00
parent 838b14b9dc
commit da1742f85c
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 10 additions and 5 deletions

View file

@ -48,13 +48,18 @@ class UriUtils {
fun isInstanceInternalFileUrl(baseUrl: String, url: String): Boolean {
// https://cloud.nextcloud.com/apps/files/?dir=/Engineering&fileid=41
return (url.startsWith("$baseUrl/apps/files/") || url.startsWith("$baseUrl/index.php/apps/files/")) &&
Uri.parse(url).queryParameterNames.contains("fileid") && Regex(""".*fileid=\d*""").matches(url)
return (
url.startsWith("$baseUrl/apps/files/") ||
url.startsWith("$baseUrl/index.php/apps/files/")
) &&
Uri.parse(url).queryParameterNames.contains("fileid") &&
Regex(""".*fileid=\d*""").matches(url)
}
fun isInstanceInternalFileUrlNew(baseUrl: String, url: String): Boolean {
// https://cloud.nextcloud.com/apps/files/files/41?dir=/
return url.startsWith("$baseUrl/apps/files/files/") || url.startsWith("$baseUrl/index.php/apps/files/files/")
return url.startsWith("$baseUrl/apps/files/files/") ||
url.startsWith("$baseUrl/index.php/apps/files/files/")
}
fun extractInstanceInternalFileFileIdNew(url: String): String {

View file

@ -1,5 +1,5 @@
build:
maxIssues: 117
maxIssues: 116
weights:
# complexity: 2
# LongParameterList: 1