File tree Expand file tree Collapse file tree 5 files changed +48
-12
lines changed
core/src/main/java/org/openedx/core Expand file tree Collapse file tree 5 files changed +48
-12
lines changed Original file line number Diff line number Diff line change 1+ name : Detekt
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request : { }
6+
7+ env :
8+ GRADLE_OPTS : -Dorg.gradle.daemon=false
9+ CI_GRADLE_ARG_PROPERTIES : --stacktrace
10+
11+ jobs :
12+ linting :
13+ name : Run Detekt
14+ runs-on : ubuntu-latest
15+ permissions :
16+ security-events : write
17+
18+ steps :
19+ - name : Checkout Repo
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Java
23+ uses : actions/setup-java@v4
24+ with :
25+ distribution : ' temurin' # See 'Supported distributions' for available options
26+ java-version : ' 17'
27+
28+ - name : Run Detekt
29+ run : ./gradlew detektAll
30+
31+ - name : Upload report
32+ uses : github/codeql-action/upload-sarif@v3
33+ if : success() || failure()
34+ with :
35+ sarif_file : build/reports/detekt/detekt.sarif
36+ checkout_path : /home/runner/work/openedx-app-android/openedx-app-android
Original file line number Diff line number Diff line change 11build :
2- maxIssues : 100
2+ maxIssues : 0
33 weights :
44 complexity : 2
55 LongParameterList : 1
@@ -43,19 +43,13 @@ style:
4343 active : true
4444 ignoreAnnotated :
4545 - ' Preview'
46- ForbiddenComment :
47- active : false
48- SerialVersionUIDInSerializableClass :
49- active : false
5046
5147complexity :
5248 active : true
5349 LongMethod :
5450 active : true
5551 ignoreAnnotated : [ 'Composable' ]
5652 ignoreFunction : [ 'onCreateView' ]
57- LargeClass :
58- active : false
5953 LongParameterList :
6054 active : true
6155 functionThreshold : 15
@@ -64,8 +58,8 @@ complexity:
6458 ignoreAnnotated : [ 'Composable' ]
6559 TooManyFunctions :
6660 active : true
67- thresholdInClasses : 30
68- thresholdInInterfaces : 30
61+ thresholdInClasses : 21
62+ thresholdInInterfaces : 20
6963 ignoreAnnotatedFunctions : [ 'Composable' ]
7064 ignoreOverridden : true
7165 ignorePrivate : true
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import com.google.gson.JsonParser
88import org.openedx.core.domain.model.AgreementUrls
99import java.io.InputStreamReader
1010
11+ @Suppress(" TooManyFunctions" )
1112class Config (context : Context ) {
1213
1314 private var configProperties: JsonObject = try {
Original file line number Diff line number Diff line change 11package org.openedx.core.domain.model
22
3- import java.io.Serializable
3+ import com.google.gson.annotations.SerializedName
44
55data class AppConfig (
66 val courseDatesCalendarSync : CourseDatesCalendarSync = CourseDatesCalendarSync (),
7- ) : Serializable
7+ )
88
99data class CourseDatesCalendarSync (
10+ @SerializedName(" is_enabled" )
1011 val isEnabled : Boolean = false ,
12+ @SerializedName(" is_self_paced_enabled" )
1113 val isSelfPacedEnabled : Boolean = false ,
14+ @SerializedName(" is_instructor_paced_enabled" )
1215 val isInstructorPacedEnabled : Boolean = false ,
16+ @SerializedName(" is_deep_link_enabled" )
1317 val isDeepLinkEnabled : Boolean = false ,
14- ) : Serializable
18+ )
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import org.openedx.foundation.presentation.UIMessage
4040import org.openedx.foundation.system.ResourceManager
4141import java.net.UnknownHostException
4242
43+ @Suppress(" LargeClass" )
4344@OptIn(ExperimentalCoroutinesApi ::class )
4445class DiscussionCommentsViewModelTest {
4546
You can’t perform that action at this time.
0 commit comments