onceover-codequality 0.3.0 → 0.4.0
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 +5 -0
- data/lib/onceover/codequality/cli.rb +9 -8
- data/lib/onceover/codequality/lint.rb +13 -8
- data/lib/onceover/codequality/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe144a873aa69c717b5753eb7a3b4abb152c591141f592d19561b3a438d5e492
|
|
4
|
+
data.tar.gz: 35d0b274abb8378261972c94814aa05bf9c85f0f6db98dbbaae2ab1ea29c7689
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4b9529fcf02d3ae4b769a4a09723216f94c7aa78d3461dd8fa33b9bd562ddf6dd061732102977c4916fc55544cff9eb8e6624402aaa1e0e92398d32baa50437
|
|
7
|
+
data.tar.gz: a99f4b38979decc2f7fc9295e9374a9cd15db03a906bdfa46f15491ab63562f88248b4ec513be7b0fb42e8f7496d7799ccdc898bba38f2da3c5b477899f7fcb4
|
data/README.md
CHANGED
|
@@ -57,6 +57,11 @@ $ onceover run codequality --no_puppetfile
|
|
|
57
57
|
$ onceover run codequality --no_doc
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
**Use custom lint settings**
|
|
61
|
+
Create a file `puppet-lint.rc` in the directory you run `onceover codequality`
|
|
62
|
+
from and it will be automatically used by Puppet Lint. If missing, the built-in
|
|
63
|
+
defaults from `lib/onceover/codequality/lint.rb` will be used.
|
|
64
|
+
|
|
60
65
|
|
|
61
66
|
## Sample output
|
|
62
67
|
|
|
@@ -28,6 +28,15 @@ class Onceover
|
|
|
28
28
|
no_puppetfile = opts[:no_puppetfile] || false
|
|
29
29
|
html_docs = opts[:html_docs] || false
|
|
30
30
|
status = true
|
|
31
|
+
|
|
32
|
+
if ! no_syntax
|
|
33
|
+
logger.info "Checking syntax..."
|
|
34
|
+
if ! Onceover::CodeQuality::Syntax.puppet
|
|
35
|
+
status = false
|
|
36
|
+
logger.error "Syntax test failed, see previous errors"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
31
40
|
if ! no_lint
|
|
32
41
|
logger.info "Checking for lint..."
|
|
33
42
|
if ! Onceover::CodeQuality::Lint.puppet
|
|
@@ -44,14 +53,6 @@ class Onceover
|
|
|
44
53
|
end
|
|
45
54
|
end
|
|
46
55
|
|
|
47
|
-
if ! no_syntax
|
|
48
|
-
logger.info "Checking syntax..."
|
|
49
|
-
if ! Onceover::CodeQuality::Syntax.puppet
|
|
50
|
-
status = false
|
|
51
|
-
logger.error "Syntax test failed, see previous errors"
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
56
|
if ! no_docs
|
|
56
57
|
logger.info "Generating documentation..."
|
|
57
58
|
if ! Onceover::CodeQuality::Docs.puppet_strings(html_docs)
|
|
@@ -7,14 +7,19 @@ class Onceover
|
|
|
7
7
|
"manifests",
|
|
8
8
|
].concat(Dir.glob('site/*').select {|f| File.directory? f})
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
# use our default options unless user has created own settings
|
|
11
|
+
if ! File.exist? ".puppet-lint.rc"
|
|
12
|
+
LINT_OPTIONS = [
|
|
13
|
+
"--relative",
|
|
14
|
+
"--fail-on-warnings",
|
|
15
|
+
"--no-double_quoted_strings-check",
|
|
16
|
+
"--no-80chars-check",
|
|
17
|
+
"--no-variable_scope-check",
|
|
18
|
+
"--no-quoted_booleans-check",
|
|
19
|
+
].freeze
|
|
20
|
+
else
|
|
21
|
+
LINT_OPTIONS = [].freeze
|
|
22
|
+
end
|
|
18
23
|
|
|
19
24
|
def self.puppet
|
|
20
25
|
status = true
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onceover-codequality
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Declarative Systems
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|