pronto-reek 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/checks.yml +3 -2
- data/README.md +9 -0
- data/lib/pronto/reek/version.rb +1 -1
- data/lib/pronto/reek.rb +9 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b5dfd4b3e1094f4e66c8f3d371f9663b3c140dc810c3ec7e1600ba1e08fe797
|
4
|
+
data.tar.gz: 86dbfdb203ea9d8740ddbea37e2af155c71f789d86874424d132c1668df24e8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c54258b02c26d857678243b6deca4d8381ca1bb0ca8a9d55dcf75889a546b810c0402ef6014551302befe5b7153251484f60ad6b9ca91a2548d78c8fe7e80a8c
|
7
|
+
data.tar.gz: 3e3603f8c8ad72bc23bd964f2cb521eb6bb6ab1a982ec8bbd0ecc177e85479e83bcf05cb72fcfa230dcdbf0f54a9bb6d5e5dd4455387049ac888856a1bf4f380
|
@@ -11,9 +11,10 @@ jobs:
|
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
|
14
|
+
ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
|
15
|
+
fail-fast: false
|
15
16
|
steps:
|
16
|
-
- uses: actions/checkout@
|
17
|
+
- uses: actions/checkout@v3
|
17
18
|
- uses: ruby/setup-ruby@v1
|
18
19
|
with:
|
19
20
|
ruby-version: ${{ matrix.ruby }}
|
data/README.md
CHANGED
@@ -10,3 +10,12 @@ Pronto runner for [Reek](https://github.com/troessner/reek), code smell detector
|
|
10
10
|
## Configuration
|
11
11
|
|
12
12
|
Configuring Reek via [config.reek](https://github.com/troessner/reek#configuration-file), or any file ending with .reek, will work just fine with pronto-reek.
|
13
|
+
|
14
|
+
You can also specify a custom severity level for the reek smells with the environment variable PRONTO_REEK_SEVERITY_LEVEL.
|
15
|
+
|
16
|
+
Or if you prefer provide it on your `.pronto.yml` (environment variable has precedence over file):
|
17
|
+
|
18
|
+
```yaml
|
19
|
+
reek:
|
20
|
+
severity_level: warning # default is info
|
21
|
+
```
|
data/lib/pronto/reek/version.rb
CHANGED
data/lib/pronto/reek.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'pronto'
|
2
4
|
require 'reek'
|
3
5
|
|
@@ -35,7 +37,7 @@ module Pronto
|
|
35
37
|
path = line.patch.delta.new_file[:path]
|
36
38
|
message = "#{error.message.capitalize} - [#{error.smell_type}](#{error.explanatory_link})"
|
37
39
|
|
38
|
-
Message.new(path, line,
|
40
|
+
Message.new(path, line, severity_level, message, nil, self.class)
|
39
41
|
end
|
40
42
|
|
41
43
|
def patch_for_error(error)
|
@@ -43,5 +45,11 @@ module Pronto
|
|
43
45
|
patch.new_file_full_path.relative_path_from(Pathname.pwd).to_s == error.source
|
44
46
|
end
|
45
47
|
end
|
48
|
+
|
49
|
+
def severity_level
|
50
|
+
@severity_level ||= begin
|
51
|
+
ENV['PRONTO_REEK_SEVERITY_LEVEL'] || Pronto::ConfigFile.new.to_h.dig('reek', 'severity_level') || :info
|
52
|
+
end.to_sym
|
53
|
+
end
|
46
54
|
end
|
47
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-reek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindaugas Mozūras
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -86,7 +86,7 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '1.2'
|
89
|
-
description:
|
89
|
+
description:
|
90
90
|
email: mindaugas.mozuras@gmail.com
|
91
91
|
executables: []
|
92
92
|
extensions: []
|
@@ -105,7 +105,7 @@ homepage: http://github.com/mmozuras/pronto-reek
|
|
105
105
|
licenses:
|
106
106
|
- MIT
|
107
107
|
metadata: {}
|
108
|
-
post_install_message:
|
108
|
+
post_install_message:
|
109
109
|
rdoc_options: []
|
110
110
|
require_paths:
|
111
111
|
- lib
|
@@ -120,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.0.
|
124
|
-
signing_key:
|
123
|
+
rubygems_version: 3.0.9
|
124
|
+
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Pronto runner for Reek, code smell detector for Ruby
|
127
127
|
test_files: []
|