diff --git a/detekt.yml b/detekt.yml index 8e066dfe..aed2bb8e 100644 --- a/detekt.yml +++ b/detekt.yml @@ -151,8 +151,7 @@ formatting: android: true autoCorrect: true AnnotationOnSeparateLine: - active: true - autoCorrect: true + active: false ChainWrapping: active: true autoCorrect: true @@ -172,10 +171,7 @@ formatting: autoCorrect: true layout: 'idea' Indentation: - active: true - autoCorrect: true - indentSize: 4 - continuationIndentSize: 4 + active: false MaximumLineLength: active: false ModifierOrdering: diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt index ed1aba79..11e015b2 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt @@ -105,8 +105,9 @@ class ClientsFragment : Fragment() { receive = -1 } - override fun toString() = if (send < 0 || receive < 0) "" else - "▲ ${Formatter.formatFileSize(app, send)}/s\t\t▼ ${Formatter.formatFileSize(app, receive)}/s" + override fun toString() = if (send < 0 || receive < 0) "" else { + "▲ ${Formatter.formatFileSize(app, send)}/s\t\t▼ ${Formatter.formatFileSize(app, receive)}/s" + } } private inner class ClientViewHolder(parent: ViewGroup, val binding: ListitemClientBinding = diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt index 4b4f1805..841bd58a 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt @@ -162,8 +162,9 @@ class Routing(private val caller: Any, private val downstream: String) : IpNeigh MasqueradeMode.None -> { } // nothing to be done here MasqueradeMode.Simple -> { // note: specifying -i wouldn't work for POSTROUTING - iptablesAdd(if (upstream == null) "vpnhotspot_masquerade -s $hostSubnet -j MASQUERADE" else - "vpnhotspot_masquerade -s $hostSubnet -o $upstream -j MASQUERADE", "nat") + iptablesAdd(if (upstream == null) { + "vpnhotspot_masquerade -s $hostSubnet -j MASQUERADE" + } else "vpnhotspot_masquerade -s $hostSubnet -o $upstream -j MASQUERADE", "nat") } MasqueradeMode.Netd -> { check(upstream != null) // fallback is only needed for repeater on API 23 < 28