Skip to content

Commit 07817ad

Browse files
authored
Migrate from code_climate to QLTY (#282)
* Migrate from code_climate to QLTY * Pinned GH action * Cleanup
1 parent b4da3ef commit 07817ad

2 files changed

Lines changed: 95 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fetch-depth: 0
3535
submodules: true
3636

37-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
37+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3838
with:
3939
node-version-file: package.json
4040
registry-url: https://npm.pkg.github.com
@@ -101,14 +101,12 @@ jobs:
101101
git commit -m "Update CHANGELOG.md after release [skip ci]"
102102
git push
103103
104-
- name: Publish coverage report to Code Climate
104+
- name: Publish coverage report to QLTY
105105
if: github.repository_owner == 'Open-CMSIS-Pack'
106-
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0
107-
env:
108-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
106+
uses: qltysh/qlty-action/coverage@f13b3559771beedd11e68b03d49512f3c21a75ba # v1
109107
with:
110-
debug: true
111-
coverageLocations: coverage/lcov.info:lcov
108+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
109+
files: coverage/lcov.info
112110

113111
package:
114112
name: Package
@@ -130,7 +128,7 @@ jobs:
130128

131129
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
132130

133-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
131+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
134132
with:
135133
node-version-file: package.json
136134
registry-url: https://npm.pkg.github.com

.qlty/qlty.toml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
"**/node_modules/**", # Ignore node_modules directories
7+
"**/dist/**", # Ignore distribution/build output
8+
"**/coverage/**" # Ignore code coverage output
9+
]
10+
11+
# Glob patterns to identify test files
12+
test_patterns = [
13+
"**/*.test.ts" # Match TypeScript test files
14+
]
15+
16+
# === Smells Configuration ===
17+
# Controls how detected code smells are reported
18+
[smells]
19+
mode = "comment" # Adds comments in code or PRs to report smells
20+
21+
# === Source Configuration ===
22+
# Defines a code source for analysis
23+
[[source]]
24+
name = "default" # Name of the source
25+
default = true # Marks this as the default source to scan
26+
27+
# === Individual Code Smell Toggles ===
28+
# Enables or disables detection of specific code smells
29+
30+
[smells.boolean_logic]
31+
enabled = true # Detects overly complex or nested boolean logic
32+
33+
[smells.similar_code]
34+
enabled = true # Detects similar (but not identical) code blocks
35+
36+
[smells.duplication]
37+
enabled = true # Detects duplication of code blocks
38+
39+
[smells.identical_code]
40+
enabled = true # Detects exact duplicate code blocks
41+
42+
[smells.function_parameters]
43+
enabled = false # Flags functions with too many parameters
44+
45+
[smells.nested_control_flow]
46+
enabled = false # Would flag deeply nested control flow (e.g., many if/else)
47+
48+
[smells.file_complexity]
49+
enabled = false # Would flag files with high overall complexity
50+
51+
[smells.function_complexity]
52+
enabled = false # Would flag individual functions that are too complex
53+
54+
[smells.return_statements]
55+
enabled = false # Would flag functions with multiple return paths
56+
57+
# === Plugins Section ===
58+
# Each plugin performs a specific type of analysis or linting
59+
60+
[[plugin]]
61+
name = "actionlint" # Validates GitHub Actions workflows
62+
63+
[[plugin]]
64+
name = "osv-scanner" # Scans for known vulnerabilities using OSV database
65+
66+
[[plugin]]
67+
name = "ripgrep" # Fast searching for pattern matching in codebase
68+
69+
[[plugin]]
70+
name = "trivy" # Scans for vulnerabilities in containers and dependencies
71+
72+
[[plugin]]
73+
name = "trufflehog" # Detects secrets and sensitive data in code
74+
75+
[[plugin]]
76+
name = "yamllint" # Lints YAML files for syntax and style
77+
enabled = false
78+
79+
[[plugin]]
80+
name = "markdownlint" # Lints Markdown files
81+
enabled = false
82+
83+
[[plugin]]
84+
name = "prettier" # Ensures consistent code formatting
85+
enabled = false
86+
87+
[[plugin]]
88+
name = "checkov" # Performs security and compliance checks on IaC files
89+
enabled = false

0 commit comments

Comments
 (0)