From a5ccc0096c9618bef594979e76ad382d192b3e16 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:13:17 +0000 Subject: [PATCH 1/3] chore: add qlty configuration and CI checks --- .github/workflows/ci.yml | 18 +++++++++++ .gitignore | 6 ++++ .husky/pre-commit | 2 +- .qlty/qlty.toml | 69 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 .qlty/qlty.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 952ddb9af2..06cbe35839 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,24 @@ jobs: - name: Check Prettier formatting run: npm run format + 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 + build: name: Build & Test runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 6b25014ba1..3f9ee43792 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,9 @@ src/webviews/webview-side/interactive-common/variableExplorerGrid.css src/webviews/webview-side/interactive-common/variableExplorerGrid.css.map src/webviews/webview-side/react-common/seti/seti.css src/webviews/webview-side/react-common/seti/seti.css.map +# Qlty cache directories +.qlty/cache +.qlty/logs +.qlty/out +.qlty/plugin_cachedir +.qlty/results diff --git a/.husky/pre-commit b/.husky/pre-commit index 45fb1f48a6..bc37ad3117 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -14,4 +14,4 @@ if [ -z "$changed" ]; then exit 0 fi -npx prettier $changed --check +npx prettier $changed --check && qlty check diff --git a/.qlty/qlty.toml b/.qlty/qlty.toml new file mode 100644 index 0000000000..8c871d225b --- /dev/null +++ b/.qlty/qlty.toml @@ -0,0 +1,69 @@ +# 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/**", +] + +# Code Smells Configuration +[smells] +mode = "comment" + +[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 From 95087cce2160547e34bacb671e876fb197742854 Mon Sep 17 00:00:00 2001 From: James Hobbs <15235276+jamesbhobbs@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:35:54 +0100 Subject: [PATCH 2/3] chore: fix mode --- .qlty/qlty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qlty/qlty.toml b/.qlty/qlty.toml index 8c871d225b..d2382eb4b7 100644 --- a/.qlty/qlty.toml +++ b/.qlty/qlty.toml @@ -30,7 +30,7 @@ exclude_patterns = [ # Code Smells Configuration [smells] -mode = "comment" +mode = "block" [smells.boolean_logic] enabled = true From e8d5312c0c4185969be559793da86b975b76c2ad Mon Sep 17 00:00:00 2001 From: James Hobbs <15235276+jamesbhobbs@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:51:00 +0100 Subject: [PATCH 3/3] chore: rm something that's unique to this repo for consistency of DX --- .husky/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index bc37ad3117..45fb1f48a6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -14,4 +14,4 @@ if [ -z "$changed" ]; then exit 0 fi -npx prettier $changed --check && qlty check +npx prettier $changed --check