Skip to content

Commit 99eb48f

Browse files
jamesbhobbsdevin-ai-integration[bot]coderabbitai[bot]
authored
chore: add qlty configuration and CI checks (#7)
* chore: add qlty configuration and CI checks * chore: fix mode * chore: add more qlty ignores Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 544b0c8 commit 99eb48f

File tree

3 files changed

+114
-0
lines changed

3 files changed

+114
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
12+
13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
17+
jobs:
18+
qlty:
19+
name: Qlty Check
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 3
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
26+
27+
- name: Install qlty
28+
uses: qltysh/qlty-action/install@06730ef41b86b073c3813c0fc07a0c734980ce5d
29+
30+
- name: Run qlty check
31+
run: qlty check
32+
33+
- name: Run qlty code smells analysis
34+
run: qlty smells

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,9 @@ dmypy.json
123123

124124
# Yarn cache
125125
.yarn/
126+
# Qlty cache directories
127+
.qlty/cache
128+
.qlty/logs
129+
.qlty/out
130+
.qlty/plugin_cachedir
131+
.qlty/results

.qlty/qlty.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
".venv/**",
30+
"venv/**",
31+
".tox/**",
32+
".mypy_cache/**",
33+
"**/__pycache__/**",
34+
]
35+
36+
# Code Smells Configuration
37+
[smells]
38+
mode = "block"
39+
40+
[smells.boolean_logic]
41+
enabled = true
42+
threshold = 4
43+
44+
[smells.nested_control_flow]
45+
enabled = true
46+
threshold = 4
47+
48+
[smells.function_parameters]
49+
enabled = true
50+
threshold = 5
51+
52+
[smells.function_length]
53+
enabled = true
54+
threshold = 50
55+
56+
[smells.file_length]
57+
enabled = true
58+
threshold = 500
59+
60+
[smells.cognitive_complexity]
61+
enabled = true
62+
threshold = 15
63+
64+
[smells.duplicate_code]
65+
enabled = true
66+
threshold = 6
67+
68+
[smells.large_class]
69+
enabled = true
70+
threshold = 500
71+
72+
[smells.long_parameter_list]
73+
enabled = true
74+
threshold = 2

0 commit comments

Comments
 (0)