mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-11 16:37:18 -04:00
Merge pull request #3440 from kiwix/Issue#3409
Introducing deprecated code check in CI
This commit is contained in:
commit
8a105ae296
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
|||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
- name: Static Analysis
|
- name: Static Analysis
|
||||||
run: ./gradlew detekt
|
run: ./gradlew detektDebug detektCustomExampleDebug
|
||||||
- name: Upload Lint Reports
|
- name: Upload Lint Reports
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
@ -79,7 +79,8 @@ complexity:
|
|||||||
threshold: 60
|
threshold: 60
|
||||||
LongParameterList:
|
LongParameterList:
|
||||||
active: true
|
active: true
|
||||||
threshold: 6
|
functionThreshold: 6
|
||||||
|
constructorThreshold: 6
|
||||||
ignoreDefaultParameters: false
|
ignoreDefaultParameters: false
|
||||||
MethodOverloading:
|
MethodOverloading:
|
||||||
active: false
|
active: false
|
||||||
@ -294,7 +295,7 @@ performance:
|
|||||||
potential-bugs:
|
potential-bugs:
|
||||||
active: true
|
active: true
|
||||||
Deprecation:
|
Deprecation:
|
||||||
active: false
|
active: true
|
||||||
DuplicateCaseInWhenExpression:
|
DuplicateCaseInWhenExpression:
|
||||||
active: true
|
active: true
|
||||||
EqualsAlwaysReturnsTrueOrFalse:
|
EqualsAlwaysReturnsTrueOrFalse:
|
||||||
@ -316,7 +317,7 @@ potential-bugs:
|
|||||||
LateinitUsage:
|
LateinitUsage:
|
||||||
active: false
|
active: false
|
||||||
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
||||||
excludeAnnotatedProperties: ""
|
ignoreAnnotated: []
|
||||||
ignoreOnClassesPattern: ""
|
ignoreOnClassesPattern: ""
|
||||||
MapGetWithNotNullAssertionOperator:
|
MapGetWithNotNullAssertionOperator:
|
||||||
active: false
|
active: false
|
||||||
@ -379,7 +380,7 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
ignoreOverridableFunction: true
|
ignoreOverridableFunction: true
|
||||||
excludedFunctions: 'describeContents'
|
excludedFunctions: 'describeContents'
|
||||||
excludeAnnotatedFunction: "dagger.Provides"
|
ignoreAnnotated: ["dagger.Provides"]
|
||||||
LibraryCodeMustSpecifyReturnType:
|
LibraryCodeMustSpecifyReturnType:
|
||||||
active: true
|
active: true
|
||||||
LoopWithTooManyJumpStatements:
|
LoopWithTooManyJumpStatements:
|
||||||
@ -450,10 +451,10 @@ style:
|
|||||||
active: false
|
active: false
|
||||||
UnderscoresInNumericLiterals:
|
UnderscoresInNumericLiterals:
|
||||||
active: false
|
active: false
|
||||||
acceptableDecimalLength: 5
|
acceptableLength: 5
|
||||||
UnnecessaryAbstractClass:
|
UnnecessaryAbstractClass:
|
||||||
active: true
|
active: true
|
||||||
excludeAnnotatedClasses: "dagger.Module"
|
ignoreAnnotated: ["dagger.Module"]
|
||||||
UnnecessaryAnnotationUseSiteTarget:
|
UnnecessaryAnnotationUseSiteTarget:
|
||||||
active: false
|
active: false
|
||||||
UnnecessaryApply:
|
UnnecessaryApply:
|
||||||
@ -479,7 +480,7 @@ style:
|
|||||||
active: false
|
active: false
|
||||||
UseDataClass:
|
UseDataClass:
|
||||||
active: false
|
active: false
|
||||||
excludeAnnotatedClasses: ""
|
ignoreAnnotated: []
|
||||||
allowVars: false
|
allowVars: false
|
||||||
UseIfInsteadOfWhen:
|
UseIfInsteadOfWhen:
|
||||||
active: false
|
active: false
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
package org.kiwix.kiwixmobile.core.compat
|
package org.kiwix.kiwixmobile.core.compat
|
||||||
|
|
||||||
@ -26,7 +27,6 @@ import android.net.ConnectivityManager
|
|||||||
import android.net.ConnectivityManager.TYPE_WIFI
|
import android.net.ConnectivityManager.TYPE_WIFI
|
||||||
import android.net.NetworkInfo.State.CONNECTED
|
import android.net.NetworkInfo.State.CONNECTED
|
||||||
|
|
||||||
@Suppress("Deprecation")
|
|
||||||
open class CompatV21 : Compat {
|
open class CompatV21 : Compat {
|
||||||
override fun queryIntentActivities(
|
override fun queryIntentActivities(
|
||||||
packageManager: PackageManager,
|
packageManager: PackageManager,
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
package org.kiwix.kiwixmobile.core.data.remote
|
package org.kiwix.kiwixmobile.core.data.remote
|
||||||
|
|
||||||
import io.reactivex.Observable
|
import io.reactivex.Observable
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
echo "Running lint..."
|
echo "Running lint..."
|
||||||
|
|
||||||
./gradlew ktlintCheck detekt app:lintDebug custom:lintCustomexampleDebug --daemon
|
./gradlew ktlintCheck detektDebug detektCustomExampleDebug app:lintDebug custom:lintCustomexampleDebug --daemon
|
||||||
|
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user