Skip to content

Commit d2414da

Browse files
authored
Migrate code climate to QLTY (#316)
* Migrate code climate to QLTY * Updated Badges
1 parent fd4b327 commit d2414da

File tree

4 files changed

+81
-37
lines changed

4 files changed

+81
-37
lines changed

.codeclimate.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,10 @@ jobs:
207207
run: |
208208
make coverage-check
209209
210-
- name: Publish coverage report to Code Climate
210+
- name: Publish coverage report to QLTY
211211
if: ${{ github.event.pull_request.head.repo.fork == false }}
212-
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0
213-
env:
214-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
212+
uses: qltysh/qlty-action/coverage@f13b3559771beedd11e68b03d49512f3c21a75ba # v1
215213
with:
216-
debug: true
217-
coverageLocations: ./build/cover.out:gocov
218-
prefix: github.com/Open-CMSIS-Pack/cbuild2cmake
214+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
215+
files: ./build/cover.out
216+
strip-prefix: github.com/Open-CMSIS-Pack/cbuild2cmake

.qlty/qlty.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Configuration version for compatibility with the tool
2+
config_version = "0"
3+
4+
# Glob patterns to exclude from analysis (e.g., build artifacts and dependencies)
5+
exclude_patterns = [
6+
"scripts/**",
7+
".github/**",
8+
"test/**",
9+
"**/*_test.go"
10+
]
11+
12+
# Glob patterns to identify test files
13+
test_patterns = [
14+
"**/*_test.go" # Match go test files
15+
]
16+
17+
# === Smells Configuration ===
18+
# Controls how detected code smells are reported
19+
[smells]
20+
mode = "comment" # Adds comments in code or PRs to report smells
21+
22+
# === Source Configuration ===
23+
# Defines a code source for analysis
24+
[[source]]
25+
name = "default" # Name of the source
26+
default = true # Marks this as the default source to scan
27+
28+
# === Individual Code Smell Toggles ===
29+
# Enables or disables detection of specific code smells
30+
31+
[smells.similar_code]
32+
enabled = true # Detects similar (but not identical) code blocks
33+
34+
[smells.duplication]
35+
enabled = true # Detects duplication of code blocks
36+
37+
[smells.identical_code]
38+
enabled = true # Detects exact duplicate code blocks
39+
40+
[smells.function_parameters]
41+
enabled = false # Flags functions with too many parameters
42+
43+
[smells.nested_control_flow]
44+
enabled = false # Would flag deeply nested control flow (e.g., many if/else)
45+
46+
[smells.file_complexity]
47+
enabled = false # Would flag files with high overall complexity
48+
49+
[smells.function_complexity]
50+
enabled = false # Would flag individual functions that are too complex
51+
52+
[smells.return_statements]
53+
enabled = false # Would flag functions with multiple return paths
54+
55+
[smells.boolean_logic]
56+
enabled = false # Detects overly complex or nested boolean logic
57+
58+
# === Plugins Section ===
59+
# Each plugin performs a specific type of analysis or linting
60+
61+
[[plugin]]
62+
name = "actionlint" # Validates GitHub Actions workflows
63+
64+
[[plugin]]
65+
name = "osv-scanner" # Scans for known vulnerabilities using OSV database
66+
67+
[[plugin]]
68+
name = "ripgrep" # Fast searching for pattern matching in codebase
69+
70+
[[plugin]]
71+
name = "trivy" # Scans for vulnerabilities in containers and dependencies
72+
73+
[[plugin]]
74+
name = "trufflehog" # Detects secrets and sensitive data in code

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[![Maintainability](https://api.codeclimate.com/v1/badges/692b11cd7a46cf52d6ca/maintainability)](https://codeclimate.com/github/Open-CMSIS-Pack/cbuild2cmake/maintainability)
2-
[![Test Coverage](https://api.codeclimate.com/v1/badges/692b11cd7a46cf52d6ca/test_coverage)](https://codeclimate.com/github/Open-CMSIS-Pack/cbuild2cmake/test_coverage)
1+
[![Maintainability](https://qlty.sh/badges/bd793305-62a9-4dbd-9b91-52efbb6a2cb4/maintainability.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/cbuild2cmake)
2+
[![Test Coverage](https://qlty.sh/badges/bd793305-62a9-4dbd-9b91-52efbb6a2cb4/test_coverage.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/cbuild2cmake)
33
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Open-CMSIS-Pack/cbuild2cmake/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Open-CMSIS-Pack/cbuild2cmake)
44

55
# cbuild2cmake

0 commit comments

Comments
 (0)