Skip to content
Open
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
24 changes: 24 additions & 0 deletions .github/workflows/qlty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Code Quality Check

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
qlty:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Install qlty
run: |
# Install qlty using official install script
curl https://qlty.sh | sh
echo "$HOME/.qlty/bin" >> $GITHUB_PATH

- name: Run qlty check
run: qlty check
7 changes: 7 additions & 0 deletions .qlty/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!configs
!configs/**
!hooks
!hooks/**
!qlty.toml
!.gitignore
2 changes: 2 additions & 0 deletions .qlty/configs/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignored:
- DL3008
1 change: 1 addition & 0 deletions .qlty/configs/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source-path=SCRIPTDIR
21 changes: 21 additions & 0 deletions .qlty/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends: default

rules:
document-start: disable
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
line-length: disable
indentation: disable
new-line-at-end-of-file: disable
trailing-spaces: disable
brackets: disable
colons: disable
empty-lines: disable
comments: disable
braces: disable
comments-indentation: disable
commas: disable
16 changes: 16 additions & 0 deletions .qlty/configs/dialyzer.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%% Dialyzer configuration for epp_proxy project
[
{dialyzer,
[
{warnings, [unknown, unmatched_returns, error_handling, race_conditions, underspecs]},
{plt_apps, [erts, kernel, stdlib, ssl, public_key, crypto, asn1, xmerl, inets, mnesia, os_mon, runtime_tools, sasl, tools, webtool, debugger, observer, et, wx]},
{plt_location, local},
{base_plt_apps, [erts, kernel, stdlib]},
{files_rec, ["apps/epp_proxy/src"]},
{from, byte_code},
{defines, [{debug, true}]},
{include_dirs, ["apps/epp_proxy/include"]},
{output_format, formatted},
{verbosity, 1}
]}
].
57 changes: 57 additions & 0 deletions .qlty/configs/elvis.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
%% Elvis configuration for epp_proxy project
[
{elvis,
[
{config,
[
{dirs, ["apps/epp_proxy/src", "apps/epp_proxy/test"]},
{filter, "*.erl"},
{ruleset, erl_files}
]},
{output_format, colored}
]},
{erl_files,
[
{elvis_style, line_length, #{limit => 100}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_style, macro_names, #{regex => "^[A-Z][A-Z_]*$"}},
{elvis_style, macro_module_names, #{regex => "^[A-Z][a-zA-Z0-9]*$"}},
{elvis_style, function_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
{elvis_style, variable_naming_convention, #{regex => "^[A-Z][a-zA-Z0-9_]*$"}},
{elvis_style, no_catch_expressions},
{elvis_style, no_if_expression},
{elvis_style, no_throw},
{elvis_style, no_author},
{elvis_style, no_spec_with_records},
{elvis_style, dont_repeat_yourself, #{min_complexity => 10}},
{elvis_style, no_debug_call},
{elvis_style, no_common_caveats_call},
{elvis_style, no_nested_try_catch},
{elvis_style, no_seqbind},
{elvis_style, no_useless_seqbind},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{elvis_style, module_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
{elvis_style, state_record_and_type},
{elvis_style, no_spec_with_records},
{elvis_style, callback_spec},
{elvis_style, no_catch_expressions},
{elvis_style, no_if_expression},
{elvis_style, no_throw},
{elvis_style, no_author},
{elvis_style, no_spec_with_records},
{elvis_style, dont_repeat_yourself, #{min_complexity => 10}},
{elvis_style, no_debug_call},
{elvis_style, no_common_caveats_call},
{elvis_style, no_nested_try_catch},
{elvis_style, no_seqbind},
{elvis_style, no_useless_seqbind},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{elvis_style, module_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
{elvis_style, state_record_and_type},
{elvis_style, no_spec_with_records},
{elvis_style, callback_spec}
]}
].
145 changes: 145 additions & 0 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# This file was automatically generated by `qlty init`.
# You can modify it to suit your needs.
# We recommend you to commit this file to your repository.
#
# This configuration is used by both Qlty CLI and Qlty Cloud.
#
# Qlty CLI -- Code quality toolkit for developers
# Qlty Cloud -- Fully automated Code Health Platform
#
# Try Qlty Cloud: https://qlty.sh
#
# For a guide to configuration, visit https://qlty.sh/d/config
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
config_version = "0"

exclude_patterns = [
# Build and dependency directories
"**/build/**",
"**/deps/**",
"**/dist/**",
"**/target/**",
"**/vendor/**",
"**/_build/**",
"**/node_modules/**",

# Erlang-specific excludes
"**/*.beam",
"**/*.plt",
"**/*.ez",
"**/ebin/**",
"**/log/**",
"**/rebar3.crashdump",

# Generated and temporary files
"**/generated/**",
"**/cache/**",
"**/testdata/**",

# Configuration files (keep for analysis)
# "**/config/**", # Commented out - config files are important

# Documentation and assets (keep for analysis)
# "**/assets/**", # Commented out - may contain important files

# Unused patterns for this project
"*_min.*",
"*-min.*",
"*.min.*",
"**/.yarn/**",
"**/*.d.ts",
"**/bower_components/**",
"**/extern/**",
"**/external/**",
"**/Godeps/**",
"**/gradlew/**",
"**/mvnw/**",
"**/protos/**",
"**/seed/**",
"**/templates/**",
]

test_patterns = [
"**/test/**",
"**/spec/**",
"**/*.test.*",
"**/*.spec.*",
"**/*_test.*",
"**/*_spec.*",
"**/test_*.*",
"**/spec_*.*",
# Erlang-specific test patterns
"**/*_SUITE.erl",
"**/*_test.erl",
"**/test_*.erl",
]

[smells]
mode = "comment"

[smells.boolean_logic]
threshold = 4

[smells.file_complexity]
threshold = 55

[smells.return_statements]
threshold = 4

[smells.nested_control_flow]
threshold = 4

[smells.function_parameters]
threshold = 5

[smells.function_complexity]
threshold = 8

[smells.duplication]
enabled = true
threshold = 20

[[source]]
name = "default"
default = true


# Docker and containerization
[[plugin]]
name = "dockerfmt"

[[plugin]]
name = "hadolint"

# Documentation
[[plugin]]
name = "markdownlint"
mode = "comment"

# Security scanning
[[plugin]]
name = "osv-scanner"

[[plugin]]
name = "trivy"
drivers = [
"config",
"fs-vuln",
]

[[plugin]]
name = "trufflehog"

# Shell scripts
[[plugin]]
name = "shellcheck"

[[plugin]]
name = "shfmt"

# YAML files (GitHub Actions)
[[plugin]]
name = "yamllint"

# Erlang-specific plugins
# Note: qlty doesn't support erlc plugin yet