Skip to content

Commit 5a309b8

Browse files
committed
initial
1 parent 738c8a3 commit 5a309b8

8 files changed

Lines changed: 272 additions & 0 deletions

File tree

.github/workflows/qlty.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Code Quality Check
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
qlty:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v5
16+
17+
- name: Install qlty
18+
run: |
19+
curl -sSfL https://raw.githubusercontent.com/qlty-sh/qlty/main/install.sh | sh
20+
echo "$HOME/.qlty/bin" >> $GITHUB_PATH
21+
22+
- name: Run qlty check
23+
run: qlty check

.qlty/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
!configs
3+
!configs/**
4+
!hooks
5+
!hooks/**
6+
!qlty.toml
7+
!.gitignore

.qlty/configs/.hadolint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignored:
2+
- DL3008

.qlty/configs/.shellcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source-path=SCRIPTDIR

.qlty/configs/.yamllint.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
extends: default
2+
3+
rules:
4+
document-start: disable
5+
quoted-strings:
6+
required: only-when-needed
7+
extra-allowed: ["{|}"]
8+
key-duplicates: {}
9+
octal-values:
10+
forbid-implicit-octal: true
11+
line-length: disable
12+
indentation: disable
13+
new-line-at-end-of-file: disable
14+
trailing-spaces: disable
15+
brackets: disable
16+
colons: disable
17+
empty-lines: disable
18+
comments: disable
19+
braces: disable
20+
comments-indentation: disable
21+
commas: disable

.qlty/configs/dialyzer.config

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
%% Dialyzer configuration for epp_proxy project
2+
[
3+
{dialyzer,
4+
[
5+
{warnings, [unknown, unmatched_returns, error_handling, race_conditions, underspecs]},
6+
{plt_apps, [erts, kernel, stdlib, ssl, public_key, crypto, asn1, xmerl, inets, mnesia, os_mon, runtime_tools, sasl, tools, webtool, debugger, observer, et, wx]},
7+
{plt_location, local},
8+
{base_plt_apps, [erts, kernel, stdlib]},
9+
{files_rec, ["apps/epp_proxy/src"]},
10+
{from, byte_code},
11+
{defines, [{debug, true}]},
12+
{include_dirs, ["apps/epp_proxy/include"]},
13+
{output_format, formatted},
14+
{verbosity, 1}
15+
]}
16+
].

.qlty/configs/elvis.config

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
%% Elvis configuration for epp_proxy project
2+
[
3+
{elvis,
4+
[
5+
{config,
6+
[
7+
{dirs, ["apps/epp_proxy/src", "apps/epp_proxy/test"]},
8+
{filter, "*.erl"},
9+
{ruleset, erl_files}
10+
]},
11+
{output_format, colored}
12+
]},
13+
{erl_files,
14+
[
15+
{elvis_style, line_length, #{limit => 100}},
16+
{elvis_style, no_tabs},
17+
{elvis_style, no_trailing_whitespace},
18+
{elvis_style, macro_names, #{regex => "^[A-Z][A-Z_]*$"}},
19+
{elvis_style, macro_module_names, #{regex => "^[A-Z][a-zA-Z0-9]*$"}},
20+
{elvis_style, function_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
21+
{elvis_style, variable_naming_convention, #{regex => "^[A-Z][a-zA-Z0-9_]*$"}},
22+
{elvis_style, no_catch_expressions},
23+
{elvis_style, no_if_expression},
24+
{elvis_style, no_throw},
25+
{elvis_style, no_author},
26+
{elvis_style, no_spec_with_records},
27+
{elvis_style, dont_repeat_yourself, #{min_complexity => 10}},
28+
{elvis_style, no_debug_call},
29+
{elvis_style, no_common_caveats_call},
30+
{elvis_style, no_nested_try_catch},
31+
{elvis_style, no_seqbind},
32+
{elvis_style, no_useless_seqbind},
33+
{elvis_style, used_ignored_variable},
34+
{elvis_style, no_behavior_info},
35+
{elvis_style, module_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
36+
{elvis_style, state_record_and_type},
37+
{elvis_style, no_spec_with_records},
38+
{elvis_style, callback_spec},
39+
{elvis_style, no_catch_expressions},
40+
{elvis_style, no_if_expression},
41+
{elvis_style, no_throw},
42+
{elvis_style, no_author},
43+
{elvis_style, no_spec_with_records},
44+
{elvis_style, dont_repeat_yourself, #{min_complexity => 10}},
45+
{elvis_style, no_debug_call},
46+
{elvis_style, no_common_caveats_call},
47+
{elvis_style, no_nested_try_catch},
48+
{elvis_style, no_seqbind},
49+
{elvis_style, no_useless_seqbind},
50+
{elvis_style, used_ignored_variable},
51+
{elvis_style, no_behavior_info},
52+
{elvis_style, module_naming_convention, #{regex => "^[a-z][a-zA-Z0-9_]*$"}},
53+
{elvis_style, state_record_and_type},
54+
{elvis_style, no_spec_with_records},
55+
{elvis_style, callback_spec}
56+
]}
57+
].

.qlty/qlty.toml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# This file was automatically generated by `qlty init`.
2+
# You can modify it to suit your needs.
3+
# We recommend you to commit this file to your repository.
4+
#
5+
# This configuration is used by both Qlty CLI and Qlty Cloud.
6+
#
7+
# Qlty CLI -- Code quality toolkit for developers
8+
# Qlty Cloud -- Fully automated Code Health Platform
9+
#
10+
# Try Qlty Cloud: https://qlty.sh
11+
#
12+
# For a guide to configuration, visit https://qlty.sh/d/config
13+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
14+
config_version = "0"
15+
16+
exclude_patterns = [
17+
# Build and dependency directories
18+
"**/build/**",
19+
"**/deps/**",
20+
"**/dist/**",
21+
"**/target/**",
22+
"**/vendor/**",
23+
"**/_build/**",
24+
"**/node_modules/**",
25+
26+
# Erlang-specific excludes
27+
"**/*.beam",
28+
"**/*.plt",
29+
"**/*.ez",
30+
"**/ebin/**",
31+
"**/log/**",
32+
"**/rebar3.crashdump",
33+
34+
# Generated and temporary files
35+
"**/generated/**",
36+
"**/cache/**",
37+
"**/testdata/**",
38+
39+
# Configuration files (keep for analysis)
40+
# "**/config/**", # Commented out - config files are important
41+
42+
# Documentation and assets (keep for analysis)
43+
# "**/assets/**", # Commented out - may contain important files
44+
45+
# Unused patterns for this project
46+
"*_min.*",
47+
"*-min.*",
48+
"*.min.*",
49+
"**/.yarn/**",
50+
"**/*.d.ts",
51+
"**/bower_components/**",
52+
"**/extern/**",
53+
"**/external/**",
54+
"**/Godeps/**",
55+
"**/gradlew/**",
56+
"**/mvnw/**",
57+
"**/protos/**",
58+
"**/seed/**",
59+
"**/templates/**",
60+
]
61+
62+
test_patterns = [
63+
"**/test/**",
64+
"**/spec/**",
65+
"**/*.test.*",
66+
"**/*.spec.*",
67+
"**/*_test.*",
68+
"**/*_spec.*",
69+
"**/test_*.*",
70+
"**/spec_*.*",
71+
# Erlang-specific test patterns
72+
"**/*_SUITE.erl",
73+
"**/*_test.erl",
74+
"**/test_*.erl",
75+
]
76+
77+
[smells]
78+
mode = "comment"
79+
80+
[smells.boolean_logic]
81+
threshold = 4
82+
83+
[smells.file_complexity]
84+
threshold = 55
85+
86+
[smells.return_statements]
87+
threshold = 4
88+
89+
[smells.nested_control_flow]
90+
threshold = 4
91+
92+
[smells.function_parameters]
93+
threshold = 5
94+
95+
[smells.function_complexity]
96+
threshold = 8
97+
98+
[smells.duplication]
99+
enabled = true
100+
threshold = 20
101+
102+
[[source]]
103+
name = "default"
104+
default = true
105+
106+
107+
# Docker and containerization
108+
[[plugin]]
109+
name = "dockerfmt"
110+
111+
[[plugin]]
112+
name = "hadolint"
113+
114+
# Documentation
115+
[[plugin]]
116+
name = "markdownlint"
117+
mode = "comment"
118+
119+
# Security scanning
120+
[[plugin]]
121+
name = "osv-scanner"
122+
123+
[[plugin]]
124+
name = "trivy"
125+
drivers = [
126+
"config",
127+
"fs-vuln",
128+
]
129+
130+
[[plugin]]
131+
name = "trufflehog"
132+
133+
# Shell scripts
134+
[[plugin]]
135+
name = "shellcheck"
136+
137+
[[plugin]]
138+
name = "shfmt"
139+
140+
# YAML files (GitHub Actions)
141+
[[plugin]]
142+
name = "yamllint"
143+
144+
# Erlang-specific plugins
145+
# Note: qlty doesn't support erlc plugin yet

0 commit comments

Comments
 (0)