Skip to content

Commit

Permalink
Merge pull request #3440 from kiwix/Issue#3409
Browse files Browse the repository at this point in the history
Introducing deprecated code check in CI
  • Loading branch information
kelson42 authored Jul 19, 2023
2 parents 73fe388 + 9d49bbb commit 8a105ae
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
${{ runner.os }}-gradle-
- name: Static Analysis
run: ./gradlew detekt
run: ./gradlew detektDebug detektCustomExampleDebug
- name: Upload Lint Reports
uses: actions/upload-artifact@v3
if: ${{ always() }}
Expand Down
15 changes: 8 additions & 7 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ complexity:
threshold: 60
LongParameterList:
active: true
threshold: 6
functionThreshold: 6
constructorThreshold: 6
ignoreDefaultParameters: false
MethodOverloading:
active: false
Expand Down Expand Up @@ -294,7 +295,7 @@ performance:
potential-bugs:
active: true
Deprecation:
active: false
active: true
DuplicateCaseInWhenExpression:
active: true
EqualsAlwaysReturnsTrueOrFalse:
Expand All @@ -316,7 +317,7 @@ potential-bugs:
LateinitUsage:
active: false
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
excludeAnnotatedProperties: ""
ignoreAnnotated: []
ignoreOnClassesPattern: ""
MapGetWithNotNullAssertionOperator:
active: false
Expand Down Expand Up @@ -379,7 +380,7 @@ style:
active: true
ignoreOverridableFunction: true
excludedFunctions: 'describeContents'
excludeAnnotatedFunction: "dagger.Provides"
ignoreAnnotated: ["dagger.Provides"]
LibraryCodeMustSpecifyReturnType:
active: true
LoopWithTooManyJumpStatements:
Expand Down Expand Up @@ -450,10 +451,10 @@ style:
active: false
UnderscoresInNumericLiterals:
active: false
acceptableDecimalLength: 5
acceptableLength: 5
UnnecessaryAbstractClass:
active: true
excludeAnnotatedClasses: "dagger.Module"
ignoreAnnotated: ["dagger.Module"]
UnnecessaryAnnotationUseSiteTarget:
active: false
UnnecessaryApply:
Expand All @@ -479,7 +480,7 @@ style:
active: false
UseDataClass:
active: false
excludeAnnotatedClasses: ""
ignoreAnnotated: []
allowVars: false
UseIfInsteadOfWhen:
active: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
@file:Suppress("DEPRECATION")

package org.kiwix.kiwixmobile.core.compat

Expand All @@ -26,7 +27,6 @@ import android.net.ConnectivityManager
import android.net.ConnectivityManager.TYPE_WIFI
import android.net.NetworkInfo.State.CONNECTED

@Suppress("Deprecation")
open class CompatV21 : Compat {
override fun queryIntentActivities(
packageManager: PackageManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
@file:Suppress("DEPRECATION")

package org.kiwix.kiwixmobile.core.data.remote

import io.reactivex.Observable
Expand Down
2 changes: 1 addition & 1 deletion team-props/git-hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Running lint..."

./gradlew ktlintCheck detekt app:lintDebug custom:lintCustomexampleDebug --daemon
./gradlew ktlintCheck detektDebug detektCustomExampleDebug app:lintDebug custom:lintCustomexampleDebug --daemon

status=$?

Expand Down

0 comments on commit 8a105ae

Please sign in to comment.