codeclimate 0.70.4 → 0.70.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e6e8a56d3f3ebabb28c0679163f6cd6a6aee98b
|
4
|
+
data.tar.gz: 397e334ef8d1ba97f9ef2dc19899b2e336599f64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 432ba315ca280e7dcfa0a440d4fe9d857aba835ae27128b4aaabd288e29f83a1827d289489c1932d41a2f87c96a6aa6c3dd2bb7acde51ee2accf696deea9d076
|
7
|
+
data.tar.gz: 057cb311fa2b1961a3e0506fbd1b6da7c12cd05d99acc7e4e97191c7935a1fdc047072a02611208ee22e383dfa0c61ef4cafde5a75f866f8805fd8af734a4f7a
|
@@ -11,6 +11,7 @@ module CC
|
|
11
11
|
autoload :PathIsFileValidation, "cc/analyzer/issue_validations/path_is_file_validation"
|
12
12
|
autoload :PathPresenceValidation, "cc/analyzer/issue_validations/path_presence_validation"
|
13
13
|
autoload :RelativePathValidation, "cc/analyzer/issue_validations/relative_path_validation"
|
14
|
+
autoload :RemediationPointsValidation, "cc/analyzer/issue_validations/remediation_points_validation"
|
14
15
|
autoload :SeverityValidation, "cc/analyzer/issue_validations/severity_validation"
|
15
16
|
autoload :TypeValidation, "cc/analyzer/issue_validations/type_validation"
|
16
17
|
autoload :Validation, "cc/analyzer/issue_validations/validation"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module CC
|
2
|
+
module Analyzer
|
3
|
+
module IssueValidations
|
4
|
+
class RemediationPointsValidation < Validation
|
5
|
+
def valid?
|
6
|
+
remediation_points.nil? || positive_integer?(remediation_points)
|
7
|
+
end
|
8
|
+
|
9
|
+
def message
|
10
|
+
"Remediation points must be a non-negative integer"
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def remediation_points
|
16
|
+
@remediation_points ||= object["remediation_points"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def positive_integer?(x)
|
20
|
+
x.is_a?(Integer) && x >= 0
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.70.
|
4
|
+
version: 0.70.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
@@ -188,6 +188,7 @@ files:
|
|
188
188
|
- lib/cc/analyzer/issue_validations/path_is_file_validation.rb
|
189
189
|
- lib/cc/analyzer/issue_validations/path_presence_validation.rb
|
190
190
|
- lib/cc/analyzer/issue_validations/relative_path_validation.rb
|
191
|
+
- lib/cc/analyzer/issue_validations/remediation_points_validation.rb
|
191
192
|
- lib/cc/analyzer/issue_validations/severity_validation.rb
|
192
193
|
- lib/cc/analyzer/issue_validations/type_validation.rb
|
193
194
|
- lib/cc/analyzer/issue_validations/validation.rb
|
@@ -271,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
272
|
version: '0'
|
272
273
|
requirements: []
|
273
274
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.
|
275
|
+
rubygems_version: 2.4.5
|
275
276
|
signing_key:
|
276
277
|
specification_version: 4
|
277
278
|
summary: Code Climate CLI
|