name: reviewdog
on: [ pull_request ]
jobs:
ktlint:
name: Ktlint Check Code Quality
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@main
with:
fetch-depth: 1
- name: ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
android: true
fail_on_error: true
level: warning
detekt:
name: Check Code Quality
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.head_ref }}
- name: detekt
uses: alaegin/[email protected]
with:
github_token: ${{ secrets.github_token }}
detekt_config: detekt-config.yml # Change config path
And the result
182 kotlin files were analyzed.
Complexity Report:
- 11,105 lines of code (loc)
- 9,579 source lines of code (sloc)
- 6,240 logical lines of code (lloc)
- 223 comment lines of code (cloc)
- 669 cyclomatic complexity (mcc)
- 247 cognitive complexity
- 0 number of total code smells
- 2% comment source ratio
- 107 mcc per 1,000 lloc
- 0 code smells per 1,000 lloc
Project Statistics:
- number of properties: 794
- number of functions: 414
- number of classes: 156
- number of packages: 54
- number of kt files: 182
I can't be 0 code smell. Is there any problem?
And I am curious about detekt-config.yml. Is it generated by reviewdog or is it local file that I created?