Skip to content

Commit f2ac9f0

Browse files
authored
Migration from code climate to QLTY (#531)
## Changes - Migration from Code Climate to QLTY - Badge updates - Residual cleanup ## Checklist <!-- Put an `x` in the boxes. All tasks must be completed and boxes checked before merging. --> - [ ] 🤖 This change is covered by unit tests (if applicable). - [ ] 🤹 Manual testing has been performed (if necessary). - [x] 🛡️ Security impacts have been considered (if relevant). - [ ] 📖 Documentation updates are complete (if required). - [ ] 🧠 Third-party dependencies and TPIP updated (if required).
1 parent 6ff37ce commit f2ac9f0

File tree

3 files changed

+82
-10
lines changed

3 files changed

+82
-10
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,14 @@ jobs:
165165
if: always()
166166
run: |
167167
go-junit-report -set-exit-code -in build/cpackgettests-${{ matrix.goos }}-amd64.txt -iocopy -out build/cpackget-testreport-${{ matrix.goos }}-amd64.xml
168-
169-
- name: Publish coverage report to Code Climate
168+
169+
- name: Publish coverage report to QLTY
170170
if: ${{ startsWith(matrix.runs-on, 'ubuntu') && (github.workflow != 'Release') }}
171-
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0
172-
env:
173-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
171+
uses: qltysh/qlty-action/coverage@f13b3559771beedd11e68b03d49512f3c21a75ba # v1
174172
with:
175-
debug: true
176-
coverageLocations: ./cover.out:gocov
177-
prefix: github.com/open-cmsis-pack/cpackget
173+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
174+
files: ./cover.out
175+
strip-prefix: github.com/open-cmsis-pack/cpackget
178176

179177
- name: Archive unit test results
180178
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.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+
"testdata/**",
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
@@ -4,8 +4,8 @@
44
[![Go Report Card](https://goreportcard.com/badge/github.com/open-cmsis-pack/cpackget)](https://goreportcard.com/report/github.com/open-cmsis-pack/cpackget)
55
[![GoDoc](https://godoc.org/github.com/open-cmsis-pack/cpackget?status.svg)](https://godoc.org/github.com/open-cmsis-pack/cpackget)
66

7-
[![Maintainability](https://api.codeclimate.com/v1/badges/eea6cb90a9a1e39bcff7/maintainability)](https://codeclimate.com/github/Open-CMSIS-Pack/cpackget/maintainability)
8-
[![Test Coverage](https://api.codeclimate.com/v1/badges/eea6cb90a9a1e39bcff7/test_coverage)](https://codeclimate.com/github/Open-CMSIS-Pack/cpackget/test_coverage)
7+
[![Maintainability](https://qlty.sh/badges/f4b0ccfb-f90d-4410-985d-3363e144102a/maintainability.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/cpackget)
8+
[![Test Coverage](https://qlty.sh/badges/f4b0ccfb-f90d-4410-985d-3363e144102a/test_coverage.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/cpackget)
99
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Open-CMSIS-Pack/cpackget/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Open-CMSIS-Pack/cpackget)
1010

1111
# cpackget: Open-CMSIS-Pack Package Installer

0 commit comments

Comments
 (0)