Skip to content

Commit

Permalink
Merge pull request #4487 from owncloud/feature/detekt
Browse files Browse the repository at this point in the history
[TECHNICAL] Detekt: static code analyzer
  • Loading branch information
joragua authored Jan 31, 2025
2 parents 6d365cf + e61ea92 commit e90013a
Show file tree
Hide file tree
Showing 221 changed files with 3,420 additions and 2,180 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Detekt

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:

pull_request:
branches:
- "*"
paths:
- ".github/workflows/detekt.yml"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Detekt:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: detekt execution
run: ./gradlew detekt; ./gradlew owncloudDomain:detekt; ./gradlew owncloudData:detekt; ./gradlew owncloudComLibrary:detekt; ./gradlew owncloudTestUtil:detekt
3 changes: 2 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ownCloud admins and users.
* Enhancement - Added text labels for BottomNavigationView: [#4484](https://github.com/owncloud/android/issues/4484)
* Enhancement - OCIS Light Users: [#4490](https://github.com/owncloud/android/issues/4490)
* Enhancement - Enforce OIDC auth flow via branding: [#4500](https://github.com/owncloud/android/issues/4500)
* Enhancement - Detekt: static code analyzer: [#4506](https://github.com/owncloud/android/issues/4506)
* Enhancement - Multi-Personal (1st round): [#4514](https://github.com/owncloud/android/issues/4514)
* Enhancement - Technical improvements for user quota: [#4521](https://github.com/owncloud/android/issues/4521)

Expand Down Expand Up @@ -135,6 +136,14 @@ ownCloud admins and users.
https://github.com/owncloud/android/issues/4500
https://github.com/owncloud/android/pull/4516

* Enhancement - Detekt: static code analyzer: [#4506](https://github.com/owncloud/android/issues/4506)

The Kotlin static code analyzer Detekt has been introduced with the agreed
rules, and the left code smells have been fixed throughout the whole code.

https://github.com/owncloud/android/issues/4506
https://github.com/owncloud/android/pull/4487

* Enhancement - Multi-Personal (1st round): [#4514](https://github.com/owncloud/android/issues/4514)

Support for multi-personal accounts has been added. This first approach displays
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ buildscript {
plugins {
alias libs.plugins.sonarqube
alias libs.plugins.ksp apply false
alias libs.plugins.detekt
}

allprojects {
Expand All @@ -37,6 +38,7 @@ subprojects {
apply plugin: "com.google.devtools.ksp"
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "org.sonarqube"
apply plugin: "io.gitlab.arturbosch.detekt"
}

sonarqube {
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/4487
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Detekt: static code analyzer

The Kotlin static code analyzer Detekt has been introduced with the agreed rules, and
the left code smells have been fixed throughout the whole code.

https://github.com/owncloud/android/issues/4506
https://github.com/owncloud/android/pull/4487
Loading

0 comments on commit e90013a

Please sign in to comment.