Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
7fd7684b
Commit
7fd7684b
authored
Dec 10, 2020
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine code style
parent
abbfe4a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
detekt.yml
detekt.yml
+26
-1
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
.../src/main/java/com/github/shadowsocks/ProfilesFragment.kt
+2
-4
No files found.
detekt.yml
View file @
7fd7684b
# https://github.com/
arturbosch/detekt/blob/v1.10.0
/detekt-core/src/main/resources/default-detekt-config.yml
# https://github.com/
detekt/detekt/blob/v1.14.2
/detekt-core/src/main/resources/default-detekt-config.yml
comments
:
comments
:
active
:
false
active
:
false
...
@@ -39,6 +39,8 @@ complexity:
...
@@ -39,6 +39,8 @@ complexity:
NestedBlockDepth
:
NestedBlockDepth
:
active
:
true
active
:
true
threshold
:
4
threshold
:
4
ReplaceSafeCallChainWithRun
:
active
:
true
StringLiteralDuplication
:
StringLiteralDuplication
:
active
:
true
active
:
true
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
...
@@ -64,6 +66,8 @@ coroutines:
...
@@ -64,6 +66,8 @@ coroutines:
active
:
false
active
:
false
RedundantSuspendModifier
:
RedundantSuspendModifier
:
active
:
true
active
:
true
SuspendFunWithFlowReturnType
:
active
:
true
empty-blocks
:
empty-blocks
:
active
:
true
active
:
true
...
@@ -130,6 +134,7 @@ exceptions:
...
@@ -130,6 +134,7 @@ exceptions:
active
:
true
active
:
true
ThrowingExceptionsWithoutMessageOrCause
:
ThrowingExceptionsWithoutMessageOrCause
:
active
:
true
active
:
true
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
exceptions
:
exceptions
:
-
IllegalArgumentException
-
IllegalArgumentException
-
IllegalStateException
-
IllegalStateException
...
@@ -152,6 +157,11 @@ formatting:
...
@@ -152,6 +157,11 @@ formatting:
autoCorrect
:
true
autoCorrect
:
true
AnnotationOnSeparateLine
:
AnnotationOnSeparateLine
:
active
:
false
active
:
false
AnnotationSpacing
:
active
:
true
autoCorrect
:
true
ArgumentListWrapping
:
active
:
false
ChainWrapping
:
ChainWrapping
:
active
:
true
active
:
true
autoCorrect
:
true
autoCorrect
:
true
...
@@ -302,6 +312,9 @@ naming:
...
@@ -302,6 +312,9 @@ naming:
mustBeFirst
:
true
mustBeFirst
:
true
MemberNameEqualsClassName
:
MemberNameEqualsClassName
:
active
:
false
active
:
false
NonBooleanPropertyPrefixedWithIs
:
active
:
true
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
ObjectPropertyNaming
:
ObjectPropertyNaming
:
active
:
true
active
:
true
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
excludes
:
[
'
**/test/**'
,
'
**/androidTest/**'
,
'
**/commonTest/**'
,
'
**/jvmTest/**'
,
'
**/jsTest/**'
,
'
**/iosTest/**'
]
...
@@ -378,6 +391,8 @@ potential-bugs:
...
@@ -378,6 +391,8 @@ potential-bugs:
active
:
true
active
:
true
MissingWhenCase
:
MissingWhenCase
:
active
:
false
active
:
false
NullableToStringCall
:
active
:
true
RedundantElseInWhen
:
RedundantElseInWhen
:
active
:
true
active
:
true
UnconditionalJumpStatementInLoop
:
UnconditionalJumpStatementInLoop
:
...
@@ -399,6 +414,8 @@ potential-bugs:
...
@@ -399,6 +414,8 @@ potential-bugs:
style
:
style
:
active
:
true
active
:
true
ClassOrdering
:
active
:
false
CollapsibleIfStatements
:
CollapsibleIfStatements
:
active
:
true
active
:
true
DataClassContainsFunctions
:
DataClassContainsFunctions
:
...
@@ -441,6 +458,8 @@ style:
...
@@ -441,6 +458,8 @@ style:
excludeAnnotatedFunction
:
[
'
dagger.Provides'
]
excludeAnnotatedFunction
:
[
'
dagger.Provides'
]
LibraryCodeMustSpecifyReturnType
:
LibraryCodeMustSpecifyReturnType
:
active
:
true
active
:
true
LibraryEntitiesShouldNotBePublic
:
active
:
true
LoopWithTooManyJumpStatements
:
LoopWithTooManyJumpStatements
:
active
:
true
active
:
true
maxJumpCount
:
1
maxJumpCount
:
1
...
@@ -518,14 +537,20 @@ style:
...
@@ -518,14 +537,20 @@ style:
allowedNames
:
'
(_|ignored|expected|serialVersionUID)'
allowedNames
:
'
(_|ignored|expected|serialVersionUID)'
UseArrayLiteralsInAnnotations
:
UseArrayLiteralsInAnnotations
:
active
:
true
active
:
true
UseCheckNotNull
:
active
:
true
UseCheckOrError
:
UseCheckOrError
:
active
:
true
active
:
true
UseDataClass
:
UseDataClass
:
active
:
false
active
:
false
UseEmptyCounterpart
:
active
:
true
UseIfInsteadOfWhen
:
UseIfInsteadOfWhen
:
active
:
false
active
:
false
UseRequire
:
UseRequire
:
active
:
true
active
:
true
UseRequireNotNull
:
active
:
true
UselessCallOnNotNull
:
UselessCallOnNotNull
:
active
:
true
active
:
true
UtilityClassWithPublicConstructor
:
UtilityClassWithPublicConstructor
:
...
...
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
View file @
7fd7684b
...
@@ -33,7 +33,8 @@ import android.view.LayoutInflater
...
@@ -33,7 +33,8 @@ import android.view.LayoutInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.*
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.activity.result.ActivityResultLauncher
import
androidx.activity.result.ActivityResultLauncher
import
androidx.appcompat.widget.PopupMenu
import
androidx.appcompat.widget.PopupMenu
import
androidx.appcompat.widget.Toolbar
import
androidx.appcompat.widget.Toolbar
...
@@ -41,7 +42,6 @@ import androidx.appcompat.widget.TooltipCompat
...
@@ -41,7 +42,6 @@ import androidx.appcompat.widget.TooltipCompat
import
androidx.core.os.bundleOf
import
androidx.core.os.bundleOf
import
androidx.core.view.ViewCompat
import
androidx.core.view.ViewCompat
import
androidx.fragment.app.DialogFragment
import
androidx.fragment.app.DialogFragment
import
androidx.lifecycle.lifecycleScope
import
androidx.recyclerview.widget.*
import
androidx.recyclerview.widget.*
import
com.github.shadowsocks.aidl.TrafficStats
import
com.github.shadowsocks.aidl.TrafficStats
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.BaseService
...
@@ -61,8 +61,6 @@ import com.google.zxing.BarcodeFormat
...
@@ -61,8 +61,6 @@ import com.google.zxing.BarcodeFormat
import
com.google.zxing.EncodeHintType
import
com.google.zxing.EncodeHintType
import
com.google.zxing.MultiFormatWriter
import
com.google.zxing.MultiFormatWriter
import
com.google.zxing.WriterException
import
com.google.zxing.WriterException
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.withContext
import
timber.log.Timber
import
timber.log.Timber
import
java.nio.charset.StandardCharsets
import
java.nio.charset.StandardCharsets
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment