puppet-lint-empty_string-check 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +65 -5
- data/spec/spec_helper.rb +4 -2
- metadata +26 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2JmOGIxZjYwZGIxYTRhMTRhN2VmYmQ2NjA4ZTMyZWNkYjk2MTJiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzY5YTNhNDg5Yzc1OGU0NmZiZTUxZThiYTI5ZmRlNWVkYmE1Yjc3Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTk3MjE3ZjEyYmFlNjVmN2QxYzgwMWVhYzM4OThhYWVmN2M1YjEwYjY0Y2Vk
|
10
|
+
ZTExNjM2MDI5OTEwNWM4M2NkNjFkNDA0ZDgxNzc1ODljNGFlM2M2ODk0N2E4
|
11
|
+
NDczZjQyY2VhODUyZjNhMTIzOTdiYmUxY2RkYzRlMjFmOGE4NjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjZjODEwMDcyNThiYTc3MmZmODM2MWFjZTQ0ZWRmZDU5NDY1ZmVjZWJiYjEx
|
14
|
+
ZWZhNTUwNjczYWIzMjUxNTEzYTZkZWZmZDk1NDQyZTQ0ZjZlMTk5Y2ZhMzRj
|
15
|
+
ZWU1YzY0MGYzNDgxMTg2NTVmNDkxNmE0M2FjYmNiNmZjMDE3YzM=
|
data/README.md
CHANGED
@@ -1,9 +1,69 @@
|
|
1
1
|
puppet-lint-empty_string-check
|
2
|
-
|
2
|
+
===============================
|
3
3
|
|
4
|
-
[![Build Status](https://
|
5
|
-
[![
|
6
|
-
[![Gem
|
7
|
-
[![Coverage Status](https://img.shields.io/coveralls/
|
4
|
+
[![Build Status](https://img.shields.io/travis/puppet-community/puppet-lint-empty_string-check.svg)](https://travis-ci.org/puppet-community/puppet-lint-empty_string-check)
|
5
|
+
[![Gem Version](https://img.shields.io/gem/v/puppet-lint-empty_string-check.svg)](https://rubygems.org/gems/puppet-lint-empty_string-check)
|
6
|
+
[![Gem Downloads](https://img.shields.io/gem/dt/puppet-lint-empty_string-check.svg)](https://rubygems.org/gems/puppet-lint-empty_string-check)
|
7
|
+
[![Coverage Status](https://img.shields.io/coveralls/puppet-community/puppet-lint-empty_string-check.svg)](https://coveralls.io/r/puppet-community/puppet-lint-empty_string-check?branch=master)
|
8
|
+
[![Gemnasium](https://img.shields.io/gemnasium/puppet-community/puppet-lint-empty_string-check.svg)](https://gemnasium.com/puppet-community/puppet-lint-empty_string-check)
|
9
|
+
[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)
|
8
10
|
|
9
11
|
A puppet-lint plugin to check for variables assigned to the empty string.
|
12
|
+
|
13
|
+
## Installing
|
14
|
+
|
15
|
+
### From the command line
|
16
|
+
|
17
|
+
```shell
|
18
|
+
$ gem install puppet-lint-empty_string-check
|
19
|
+
```
|
20
|
+
|
21
|
+
### In a Gemfile
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gem 'puppet-lint-empty_string-check', :require => false
|
25
|
+
```
|
26
|
+
|
27
|
+
## Checks
|
28
|
+
|
29
|
+
### Variable assigned to the empty string
|
30
|
+
|
31
|
+
The empty string is true in the future parser. `undef` should be used instead for a false value for strings.
|
32
|
+
|
33
|
+
|
34
|
+
#### What you have done
|
35
|
+
|
36
|
+
```puppet
|
37
|
+
$foo = ''
|
38
|
+
```
|
39
|
+
|
40
|
+
#### What you should have done
|
41
|
+
|
42
|
+
```puppet
|
43
|
+
$foo = undef
|
44
|
+
```
|
45
|
+
|
46
|
+
Note: There are valid cases of assigning a variable to the empty string. You should use [control comment](http://puppet-lint.com/controlcomments/) to disable checks for these.
|
47
|
+
|
48
|
+
|
49
|
+
#### Disabling the check
|
50
|
+
|
51
|
+
To disable this check, you can add `--no-empty_string_assignment-check` to your puppet-lint command line.
|
52
|
+
|
53
|
+
```shell
|
54
|
+
$ puppet-lint --no-empty_string_assignment-check path/to/file.pp
|
55
|
+
```
|
56
|
+
|
57
|
+
Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your `Rakefile`.
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
PuppetLint.configuration.send('disable_empty_string_assignment')
|
61
|
+
```
|
62
|
+
|
63
|
+
## Transfer Notice
|
64
|
+
|
65
|
+
This plugin was originally authored by [Camptocamp](http://www.camptocamp.com).
|
66
|
+
The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.
|
67
|
+
Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.
|
68
|
+
|
69
|
+
Previously: https://github.com/camptocamp/puppet-lint-empty_string-check
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-empty_string-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Puppet Community
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.0'
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rspec
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +72,20 @@ dependencies:
|
|
66
72
|
- - ~>
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '1.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: mime-types
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ~>
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ~>
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: coveralls
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +128,7 @@ files:
|
|
108
128
|
- lib/puppet-lint/plugins/check_empty_string_assignment.rb
|
109
129
|
- spec/puppet-lint/plugins/check_empty_string_assignment/check_empty_string_assignment_spec.rb
|
110
130
|
- spec/spec_helper.rb
|
111
|
-
homepage: https://github.com/
|
131
|
+
homepage: https://github.com/puppet-community/puppet-lint-empty_string-check
|
112
132
|
licenses:
|
113
133
|
- Apache-2.0
|
114
134
|
metadata: {}
|