Commit 4e239600 authored by Mygod's avatar Mygod

Refine code style

parent 53ef74d7
# https://github.com/arturbosch/detekt/blob/1.0.1/detekt-cli/src/main/resources/default-detekt-config.yml # https://github.com/arturbosch/detekt/blob/1.1.0/detekt-cli/src/main/resources/default-detekt-config.yml
comments: comments:
active: false active: false
...@@ -93,8 +93,7 @@ exceptions: ...@@ -93,8 +93,7 @@ exceptions:
active: true active: true
methodNames: 'toString,hashCode,equals,finalize' methodNames: 'toString,hashCode,equals,finalize'
InstanceOfCheckForException: InstanceOfCheckForException:
active: true active: false
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
NotImplementedDeclaration: NotImplementedDeclaration:
active: true active: true
PrintStackTrace: PrintStackTrace:
...@@ -103,6 +102,7 @@ exceptions: ...@@ -103,6 +102,7 @@ exceptions:
active: false active: false
ReturnFromFinally: ReturnFromFinally:
active: true active: true
ignoreLabeled: true
SwallowedException: SwallowedException:
active: true active: true
ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException' ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException'
...@@ -325,6 +325,8 @@ performance: ...@@ -325,6 +325,8 @@ performance:
potential-bugs: potential-bugs:
active: true active: true
Deprecation:
active: true
DuplicateCaseInWhenExpression: DuplicateCaseInWhenExpression:
active: true active: true
EqualsAlwaysReturnsTrueOrFalse: EqualsAlwaysReturnsTrueOrFalse:
...@@ -333,6 +335,8 @@ potential-bugs: ...@@ -333,6 +335,8 @@ potential-bugs:
active: true active: true
ExplicitGarbageCollectionCall: ExplicitGarbageCollectionCall:
active: true active: true
HasPlatformType:
active: true
InvalidRange: InvalidRange:
active: true active: true
IteratorHasNextCallsNextMethod: IteratorHasNextCallsNextMethod:
...@@ -378,9 +382,11 @@ style: ...@@ -378,9 +382,11 @@ style:
ForbiddenComment: ForbiddenComment:
active: true active: true
values: 'TODO:,FIXME:,STOPSHIP:' values: 'TODO:,FIXME:,STOPSHIP:'
allowedPatterns: ""
ForbiddenImport: ForbiddenImport:
active: true active: true
imports: '' imports: ''
forbiddenPatterns: ""
ForbiddenVoid: ForbiddenVoid:
active: true active: true
ignoreOverridden: true ignoreOverridden: true
...@@ -389,6 +395,7 @@ style: ...@@ -389,6 +395,7 @@ style:
active: true active: true
ignoreOverridableFunction: true ignoreOverridableFunction: true
excludedFunctions: 'describeContents' excludedFunctions: 'describeContents'
excludeAnnotatedFunction: "dagger.Provides"
LibraryCodeMustSpecifyReturnType: LibraryCodeMustSpecifyReturnType:
active: true active: true
LoopWithTooManyJumpStatements: LoopWithTooManyJumpStatements:
...@@ -419,11 +426,13 @@ style: ...@@ -419,11 +426,13 @@ style:
OptionalUnit: OptionalUnit:
active: true active: true
OptionalWhenBraces: OptionalWhenBraces:
active: true active: false
PreferToOverPairSyntax: PreferToOverPairSyntax:
active: false active: false
ProtectedMemberInFinalClass: ProtectedMemberInFinalClass:
active: true active: true
RedundantExplicitType:
active: true
RedundantVisibilityModifierRule: RedundantVisibilityModifierRule:
active: true active: true
ReturnCount: ReturnCount:
...@@ -461,10 +470,14 @@ style: ...@@ -461,10 +470,14 @@ style:
UnusedPrivateMember: UnusedPrivateMember:
active: true active: true
allowedNames: "(_|ignored|expected|serialVersionUID)" allowedNames: "(_|ignored|expected|serialVersionUID)"
UseArrayLiteralsInAnnotations:
active: true
UseCheckOrError: UseCheckOrError:
active: true active: true
UseDataClass: UseDataClass:
active: false active: false
UseIfInsteadOfWhen:
active: false
UseRequire: UseRequire:
active: true active: true
UselessCallOnNotNull: UselessCallOnNotNull:
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" /> <include layout="@layout/toolbar_light_dark" />
<fragment android:id="@+id/content" <androidx.fragment.app.FragmentContainerView
class="com.github.shadowsocks.ProfileConfigFragment" android:id="@+id/content"
android:layout_width="match_parent" android:name="com.github.shadowsocks.ProfileConfigFragment"
android:layout_height="0dp" android:layout_width="match_parent"
android:layout_weight="1"/> android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout> </LinearLayout>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/toolbar_light_dark" /> <include layout="@layout/toolbar_light_dark" />
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/barcode" android:id="@+id/barcode"
android:name="com.google.android.gms.samples.vision.barcodereader.BarcodeCapture" android:name="com.google.android.gms.samples.vision.barcodereader.BarcodeCapture"
android:layout_width="fill_parent" android:layout_width="fill_parent"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android" <androidx.fragment.app.FragmentContainerView
xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_browse_fragment" xmlns:tools="http://schemas.android.com/tools"
android:name="com.github.shadowsocks.tv.MainFragment" android:id="@+id/main_browse_fragment"
android:layout_width="match_parent" android:name="com.github.shadowsocks.tv.MainFragment"
android:layout_height="match_parent" android:layout_width="match_parent"
tools:context=".MainActivity" android:layout_height="match_parent"
tools:deviceIds="tv" tools:context=".MainActivity"
tools:ignore="MergeRootFrame"/> tools:deviceIds="tv"
tools:ignore="MergeRootFrame"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment