qualmzy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/qualmzy/checker.rb +2 -1
- data/lib/qualmzy/report.rb +11 -9
- data/lib/qualmzy/skip_rules.rb +2 -1
- data/lib/qualmzy/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5713a5989edba9528033bc543711354308b232fa92156a82e9032ef5671feab
|
|
4
|
+
data.tar.gz: 2005ed282e4889f193e146f7873d8f35605fe55f6aa6688581c16477e477707f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f31a92b05ddd3548033d755dabfb93a7cdd1ce31d7d0459e45ed40cf97dfc7f8cd0eeb8e122d71d8aebd6ddc8265b20a7f24e818b3870c27b0abf66601c42f9
|
|
7
|
+
data.tar.gz: 5f75db7c211f29353ef1a16c827a2f85bf1e3b6e4f29f0e6ca6f103e847b859dd0ead0651d18deb155d2a8f5b05e0446e038f5fc5756c6704af77a4fb134e948
|
data/README.md
CHANGED
|
@@ -25,7 +25,7 @@ qualmzy keep lib/example.rb --reason "The algorithm is intentionally complex"
|
|
|
25
25
|
qualmzy init --rails
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Supported flags are `--base`, `--threshold`, `--include-tests`, `--format`, `--cache`, `--no-cache`, `--budget`, `--jobs`, and `--dry-run`. `qualmzy init` creates a safe, empty `qualm.json`; `qualmzy init --rails` writes explicit Rails exclusions into `skip`, including schema dumps, migrations, built assets, runtime directories, and `*.key` files. The optional `qualm.json` also accepts `skip` for repository-specific patterns, plus `gate`, `drop`, `questions`, `model`, and `keeps`.
|
|
28
|
+
Supported flags are `--base`, `--threshold`, `--include-tests`, `--format`, `--cache`, `--no-cache`, `--budget`, `--jobs`, and `--dry-run`. `qualmzy init` creates a safe, empty `qualm.json`; `qualmzy init --rails` writes explicit Rails exclusions into `skip`, including schema dumps, migrations, built assets, runtime directories, and `*.key` and `*.gem` files. The optional `qualm.json` also accepts `skip` for repository-specific patterns, plus `gate`, `drop`, `questions`, `model`, and `keeps`.
|
|
29
29
|
|
|
30
30
|
The API endpoint is `https://openrouter.ai/api/alpha/decisions`; only the unified diff for each judged file is sent.
|
|
31
31
|
|
data/lib/qualmzy/checker.rb
CHANGED
|
@@ -26,7 +26,8 @@ module Qualmzy
|
|
|
26
26
|
base, changes = git.base(@base_ref), nil
|
|
27
27
|
changes = git.changes(base, @paths)
|
|
28
28
|
rules = SkipRules.new(extra: config.skip, include_tests: @include_tests)
|
|
29
|
-
diffs
|
|
29
|
+
diffs = {}
|
|
30
|
+
files = changes.map do |change|
|
|
30
31
|
if (reason = rules.reason(change.path))
|
|
31
32
|
{ path: change.path, status: "skipped", reason: reason }
|
|
32
33
|
else
|
data/lib/qualmzy/report.rb
CHANGED
|
@@ -9,15 +9,17 @@ module Qualmzy
|
|
|
9
9
|
def text(result)
|
|
10
10
|
judged = result.files.select { |file| file[:status] == "judged" }
|
|
11
11
|
failed = judged.select { |file| file[:failed]&.any? }
|
|
12
|
-
out =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
out = String.new(
|
|
13
|
+
if judged.empty?
|
|
14
|
+
"qualmzy: nothing to judge.\n"
|
|
15
|
+
elsif result.dry_run
|
|
16
|
+
"qualmzy: dry run, nothing sent.\n"
|
|
17
|
+
elsif failed.empty?
|
|
18
|
+
"qualmzy: #{count(judged.length, "changed file")}, no qualms.\n"
|
|
19
|
+
else
|
|
20
|
+
"qualmzy: #{failed.length} of #{count(judged.length, "changed file")} drew a qualm.\n"
|
|
21
|
+
end
|
|
22
|
+
)
|
|
21
23
|
skipped = result.files.select { |file| file[:status] == "skipped" }
|
|
22
24
|
unless skipped.empty?
|
|
23
25
|
reasons = skipped.group_by { |file| file[:reason] }.sort_by { |reason, files| [-files.length, reason] }.map { |reason, files| "#{files.length} #{reason}" }
|
data/lib/qualmzy/skip_rules.rb
CHANGED
data/lib/qualmzy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: qualmzy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- qualmzy contributors
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: 'Pure Ruby port of Qualm: judge changed files and fail when a reviewer
|
|
14
13
|
would ask for simplification.'
|
|
15
|
-
email:
|
|
16
14
|
executables:
|
|
17
15
|
- qualmzy
|
|
18
16
|
extensions: []
|
|
@@ -37,7 +35,6 @@ licenses:
|
|
|
37
35
|
- MIT
|
|
38
36
|
metadata:
|
|
39
37
|
source_code_uri: https://github.com/tools4imps/qualm
|
|
40
|
-
post_install_message:
|
|
41
38
|
rdoc_options: []
|
|
42
39
|
require_paths:
|
|
43
40
|
- lib
|
|
@@ -52,8 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
52
49
|
- !ruby/object:Gem::Version
|
|
53
50
|
version: '0'
|
|
54
51
|
requirements: []
|
|
55
|
-
rubygems_version:
|
|
56
|
-
signing_key:
|
|
52
|
+
rubygems_version: 4.0.21
|
|
57
53
|
specification_version: 4
|
|
58
54
|
summary: A subjective pull-request gate powered by Jev
|
|
59
55
|
test_files: []
|