Skip to content

Commit a5ccc00

Browse files
chore: add qlty configuration and CI checks
1 parent 8f22894 commit a5ccc00

File tree

4 files changed

+94
-1
lines changed

4 files changed

+94
-1
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ jobs:
4747
- name: Check Prettier formatting
4848
run: npm run format
4949

50+
qlty:
51+
name: Qlty Check
52+
runs-on: ubuntu-latest
53+
timeout-minutes: 3
54+
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
58+
59+
- name: Install qlty
60+
uses: qltysh/qlty-action/install@06730ef41b86b073c3813c0fc07a0c734980ce5d
61+
62+
- name: Run qlty check
63+
run: qlty check
64+
65+
- name: Run qlty code smells analysis
66+
run: qlty smells
67+
5068
build:
5169
name: Build & Test
5270
runs-on: ubuntu-latest

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ src/webviews/webview-side/interactive-common/variableExplorerGrid.css
6666
src/webviews/webview-side/interactive-common/variableExplorerGrid.css.map
6767
src/webviews/webview-side/react-common/seti/seti.css
6868
src/webviews/webview-side/react-common/seti/seti.css.map
69+
# Qlty cache directories
70+
.qlty/cache
71+
.qlty/logs
72+
.qlty/out
73+
.qlty/plugin_cachedir
74+
.qlty/results

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ if [ -z "$changed" ]; then
1414
exit 0
1515
fi
1616

17-
npx prettier $changed --check
17+
npx prettier $changed --check && qlty check

.qlty/qlty.toml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Qlty Configuration
2+
# Learn more at https://docs.qlty.sh
3+
config_version = "0"
4+
5+
# Plugins configuration
6+
[[plugin]]
7+
name = "actionlint"
8+
9+
[[plugin]]
10+
name = "trufflehog"
11+
12+
[[plugin]]
13+
name = "osv-scanner"
14+
15+
# Source configuration
16+
[[source]]
17+
name = "default"
18+
default = true
19+
20+
# Exclusion patterns
21+
exclude_patterns = [
22+
"node_modules/**",
23+
"dist/**",
24+
"build/**",
25+
"coverage/**",
26+
"**/*.min.js",
27+
"**/*.min.css",
28+
".git/**",
29+
]
30+
31+
# Code Smells Configuration
32+
[smells]
33+
mode = "comment"
34+
35+
[smells.boolean_logic]
36+
enabled = true
37+
threshold = 4
38+
39+
[smells.nested_control_flow]
40+
enabled = true
41+
threshold = 4
42+
43+
[smells.function_parameters]
44+
enabled = true
45+
threshold = 5
46+
47+
[smells.function_length]
48+
enabled = true
49+
threshold = 50
50+
51+
[smells.file_length]
52+
enabled = true
53+
threshold = 500
54+
55+
[smells.cognitive_complexity]
56+
enabled = true
57+
threshold = 15
58+
59+
[smells.duplicate_code]
60+
enabled = true
61+
threshold = 6
62+
63+
[smells.large_class]
64+
enabled = true
65+
threshold = 500
66+
67+
[smells.long_parameter_list]
68+
enabled = true
69+
threshold = 2

0 commit comments

Comments
 (0)