Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read
pull-requests: read

jobs:
qlty:
name: Qlty Check
runs-on: ubuntu-latest
timeout-minutes: 3

steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install qlty
uses: qltysh/qlty-action/install@06730ef41b86b073c3813c0fc07a0c734980ce5d

- name: Run qlty check
run: qlty check

- name: Run qlty code smells analysis
run: qlty smells
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,9 @@ dmypy.json

# Yarn cache
.yarn/
# Qlty cache directories
.qlty/cache
.qlty/logs
.qlty/out
.qlty/plugin_cachedir
.qlty/results
74 changes: 74 additions & 0 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Qlty Configuration
# Learn more at https://docs.qlty.sh
config_version = "0"

# Plugins configuration
[[plugin]]
name = "actionlint"

[[plugin]]
name = "trufflehog"

[[plugin]]
name = "osv-scanner"

# Source configuration
[[source]]
name = "default"
default = true

# Exclusion patterns
exclude_patterns = [
"node_modules/**",
"dist/**",
"build/**",
"coverage/**",
"**/*.min.js",
"**/*.min.css",
".git/**",
".venv/**",
"venv/**",
".tox/**",
".mypy_cache/**",
"**/__pycache__/**",
]

# Code Smells Configuration
[smells]
mode = "block"

[smells.boolean_logic]
enabled = true
threshold = 4

[smells.nested_control_flow]
enabled = true
threshold = 4

[smells.function_parameters]
enabled = true
threshold = 5

[smells.function_length]
enabled = true
threshold = 50

[smells.file_length]
enabled = true
threshold = 500

[smells.cognitive_complexity]
enabled = true
threshold = 15

[smells.duplicate_code]
enabled = true
threshold = 6

[smells.large_class]
enabled = true
threshold = 500

[smells.long_parameter_list]
enabled = true
threshold = 2