puppet-lint-module_reference-check 0.1.2 → 0.1.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12922e4a40ec5041a4fdbd2859cbacb179d2ad3242a6c536a0396e14eeb21f53
|
4
|
+
data.tar.gz: 11cafcbe2535f7a2275825a53ff3c590e6ebd28c1ae9239775537a139eb6b061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 558649a232611019dfec62b41f410086855a19d8014e01e42f742d8007b40253a652d913434624d026055fa287d6716cf10344da0ec26756384c2ec43c357ac2
|
7
|
+
data.tar.gz: 55e2eb095791d72415cd9b09ec4b8adcbe0722f8e6679349ed36bfbf1fe2164087a972ec2794565cba91484265f86a2fb74466451f4591c206a7208e062f98b3
|
data/README.md
CHANGED
@@ -20,6 +20,9 @@ This checks whether used modules are properly referenced in the comments by thes
|
|
20
20
|
- internal modules
|
21
21
|
- modules referenced by features
|
22
22
|
|
23
|
+
**Note**: This check can only detect component module usage with the `class` and `include` keywords, but supports
|
24
|
+
reference comments to undetectable components modules as well.
|
25
|
+
|
23
26
|
## Usage
|
24
27
|
|
25
28
|
To use the plugin, add the following line to the Gemfile:
|
@@ -59,6 +59,25 @@ describe 'module_reference' do
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
context 'valid code with correctly sorted reference to undetectable component module' do
|
63
|
+
let(:code) do
|
64
|
+
<<~CODE
|
65
|
+
# @ref foo
|
66
|
+
# @note undetected-a
|
67
|
+
# @see https://forge.puppet.com/modules/undetected/a
|
68
|
+
# @ref bar
|
69
|
+
# @note undetected-b
|
70
|
+
# @see https://forge.puppet.com/modules/undetected/b
|
71
|
+
class test () {
|
72
|
+
}
|
73
|
+
CODE
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'should detect detect any problems' do
|
77
|
+
expect(problems).to have(0).problems
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
62
81
|
context 'valid code with using include in a different context' do
|
63
82
|
let(:code) do
|
64
83
|
<<~CODE
|