Skip to content

Commit a5e4288

Browse files
authored
Migrate from code climate to QLTY (#178)
1 parent 5da74b4 commit a5e4288

3 files changed

Lines changed: 82 additions & 10 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,9 @@ jobs:
222222
run: |
223223
make coverage-check
224224
225-
- name: Publish coverage report to Code Climate
226-
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0
227-
env:
228-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
229-
with:
230-
debug: true
231-
coverageLocations: ./cover.out:gocov
232-
prefix: github.com/open-cmsis-pack/generator-bridge
225+
- name: Publish coverage report to QLTY
226+
uses: qltysh/qlty-action/coverage@f13b3559771beedd11e68b03d49512f3c21a75ba # v1
227+
with:
228+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
229+
files: ./cover.out
230+
strip-prefix: github.com/open-cmsis-pack/generator-bridge

.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
@@ -3,8 +3,8 @@
33
[![Markdown](https://github.com/Open-CMSIS-Pack/generator-bridge/actions/workflows/markdown.yml/badge.svg)](https://github.com/Open-CMSIS-Pack/generator-bridge/actions/workflows/markdown.yml)
44
[![TPIP](https://github.com/Open-CMSIS-Pack/generator-bridge/actions/workflows/tpip-check.yml/badge.svg)](https://github.com/Open-CMSIS-Pack/generator-bridge/actions/workflows/tpip-check.yml)
55

6-
[![Maintainability](https://api.codeclimate.com/v1/badges/34a60fa31d662d3a1c9a/maintainability)](https://codeclimate.com/github/Open-CMSIS-Pack/generator-bridge/maintainability)
7-
[![Test Coverage](https://api.codeclimate.com/v1/badges/34a60fa31d662d3a1c9a/test_coverage)](https://codeclimate.com/github/Open-CMSIS-Pack/generator-bridge/test_coverage)
6+
[![Maintainability](https://qlty.sh/badges/b857d2f6-41ee-4e0a-85fd-5b0dbe9832ca/maintainability.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/generator-bridge)
7+
[![Test Coverage](https://qlty.sh/badges/b857d2f6-41ee-4e0a-85fd-5b0dbe9832ca/test_coverage.svg)](https://qlty.sh/gh/Open-CMSIS-Pack/projects/generator-bridge)
88
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Open-CMSIS-Pack/generator-bridge/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Open-CMSIS-Pack/generator-bridge)
99

1010
# generator_bridge

0 commit comments

Comments
 (0)