puppet-lint 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +70 -2
- data/Rakefile +2 -0
- data/lib/puppet-lint/data.rb +9 -9
- data/lib/puppet-lint/lexer.rb +2 -1
- data/lib/puppet-lint/lexer/string_slurper.rb +2 -2
- data/lib/puppet-lint/version.rb +1 -1
- data/spec/puppet-lint/lexer/string_slurper_spec.rb +24 -0
- data/spec/puppet-lint/lexer_spec.rb +41 -0
- data/spec/puppet-lint/plugins/check_classes/variable_scope_spec.rb +14 -0
- 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: 0fa8ccdacaaf00403458aeef208d94be4301b423aa3232a6942b3985a45d3c26
|
4
|
+
data.tar.gz: 5595f3952d848f58ef30740c23a7bac45609126c7b8c0580449c5c7b9923d2dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba63149aaa806086932bb1d82f61a5dbae15929e4b3188f31a44fceb1e5e7814454869e1eed8f406dc403f168522cbd79c340cefcf3f530d5ebce03e4fb7086b
|
7
|
+
data.tar.gz: f086f1ee7fc733f224fe8ae2793736ec9f98d375db779f44174c237a712e315dc25b6f837d1561d67321246a962e4a332c8a75977c32d9ca41967eab6ea12cb0
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [2.4.2](https://github.com/rodjek/puppet-lint/tree/2.4.2) (2019-10-31)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.4.1...2.4.2)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- `ERROR: Syntax error \(unterminated string\)` with 2.4.1 [\#899](https://github.com/rodjek/puppet-lint/issues/899)
|
10
|
+
- Double quoted string containing variable named "node" mis-tokenized [\#897](https://github.com/rodjek/puppet-lint/issues/897)
|
11
|
+
- 2.4.1 says Syntax error, but code runs fine [\#891](https://github.com/rodjek/puppet-lint/issues/891)
|
12
|
+
- Error with regex variable with multiple `|`s. [\#859](https://github.com/rodjek/puppet-lint/issues/859)
|
13
|
+
|
14
|
+
**Closed issues:**
|
15
|
+
|
16
|
+
- WARNING: double quoted string containing no variables [\#895](https://github.com/rodjek/puppet-lint/issues/895)
|
17
|
+
|
18
|
+
**Merged pull requests:**
|
19
|
+
|
20
|
+
- Fix regression in tokenization in double-quoted strings [\#898](https://github.com/rodjek/puppet-lint/pull/898) ([seanmil](https://github.com/seanmil))
|
21
|
+
- Speed up calculation of resource indexes [\#893](https://github.com/rodjek/puppet-lint/pull/893) ([usev6](https://github.com/usev6))
|
22
|
+
- Search end of string before assuming escaped quote [\#892](https://github.com/rodjek/puppet-lint/pull/892) ([usev6](https://github.com/usev6))
|
23
|
+
- Allow parsing of regexes as rvalues [\#882](https://github.com/rodjek/puppet-lint/pull/882) ([usev6](https://github.com/usev6))
|
2
24
|
|
3
25
|
## [2.4.1](https://github.com/rodjek/puppet-lint/tree/2.4.1) (2019-10-09)
|
26
|
+
|
4
27
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.4.0...2.4.1)
|
5
28
|
|
6
29
|
**Fixed bugs:**
|
@@ -15,6 +38,7 @@
|
|
15
38
|
- Fix non-indented heredoc parsing [\#888](https://github.com/rodjek/puppet-lint/pull/888) ([rodjek](https://github.com/rodjek))
|
16
39
|
|
17
40
|
## [2.4.0](https://github.com/rodjek/puppet-lint/tree/2.4.0) (2019-10-08)
|
41
|
+
|
18
42
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.6...2.4.0)
|
19
43
|
|
20
44
|
**Fixed bugs:**
|
@@ -68,6 +92,7 @@
|
|
68
92
|
- Recognizes multiline regexes [\#835](https://github.com/rodjek/puppet-lint/pull/835) ([jcbollinger](https://github.com/jcbollinger))
|
69
93
|
|
70
94
|
## [2.3.6](https://github.com/rodjek/puppet-lint/tree/2.3.6) (2018-07-09)
|
95
|
+
|
71
96
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.5...2.3.6)
|
72
97
|
|
73
98
|
**Fixed bugs:**
|
@@ -88,6 +113,7 @@
|
|
88
113
|
- Run all the checks before fixing problems [\#815](https://github.com/rodjek/puppet-lint/pull/815) ([rodjek](https://github.com/rodjek))
|
89
114
|
|
90
115
|
## [2.3.5](https://github.com/rodjek/puppet-lint/tree/2.3.5) (2018-03-27)
|
116
|
+
|
91
117
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.4...2.3.5)
|
92
118
|
|
93
119
|
**Fixed bugs:**
|
@@ -99,6 +125,7 @@
|
|
99
125
|
- Make PuppetLint::OptParser.build argument optional [\#813](https://github.com/rodjek/puppet-lint/pull/813) ([rodjek](https://github.com/rodjek))
|
100
126
|
|
101
127
|
## [2.3.4](https://github.com/rodjek/puppet-lint/tree/2.3.4) (2018-03-26)
|
128
|
+
|
102
129
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.3...2.3.4)
|
103
130
|
|
104
131
|
**Implemented enhancements:**
|
@@ -123,6 +150,7 @@
|
|
123
150
|
- Add support for passing backslash separated paths to puppet-lint [\#769](https://github.com/rodjek/puppet-lint/pull/769) ([rodjek](https://github.com/rodjek))
|
124
151
|
|
125
152
|
## [2.3.3](https://github.com/rodjek/puppet-lint/tree/2.3.3) (2017-09-28)
|
153
|
+
|
126
154
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.2...2.3.3)
|
127
155
|
|
128
156
|
**Closed issues:**
|
@@ -140,6 +168,7 @@
|
|
140
168
|
- Fix setup of default log\_format in PuppetLink.configuration when it is empty. [\#757](https://github.com/rodjek/puppet-lint/pull/757) ([zekefast](https://github.com/zekefast))
|
141
169
|
|
142
170
|
## [2.3.2](https://github.com/rodjek/puppet-lint/tree/2.3.2) (2017-09-27)
|
171
|
+
|
143
172
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.1...2.3.2)
|
144
173
|
|
145
174
|
**Fixed bugs:**
|
@@ -147,6 +176,7 @@
|
|
147
176
|
- configuration, method_missing had faulty logic [\#754](https://github.com/rodjek/puppet-lint/issues/754)
|
148
177
|
|
149
178
|
## [2.3.1](https://github.com/rodjek/puppet-lint/tree/2.3.1) (2017-09-27)
|
179
|
+
|
150
180
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.0...2.3.1)
|
151
181
|
|
152
182
|
**Fixed bugs:**
|
@@ -201,6 +231,7 @@
|
|
201
231
|
- Plugins: Improve code readability [\#658](https://github.com/rodjek/puppet-lint/pull/658) ([Darhazer](https://github.com/Darhazer))
|
202
232
|
|
203
233
|
## [2.3.0](https://github.com/rodjek/puppet-lint/tree/2.3.0) (2017-07-12)
|
234
|
+
|
204
235
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.2.1...2.3.0)
|
205
236
|
|
206
237
|
**Closed issues:**
|
@@ -224,6 +255,7 @@
|
|
224
255
|
- One file per plugin. Fixes \#657 [\#671](https://github.com/rodjek/puppet-lint/pull/671) ([Darhazer](https://github.com/Darhazer))
|
225
256
|
|
226
257
|
## [2.2.1](https://github.com/rodjek/puppet-lint/tree/2.2.1) (2017-03-29)
|
258
|
+
|
227
259
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.2.0...2.2.1)
|
228
260
|
|
229
261
|
**Closed issues:**
|
@@ -239,6 +271,7 @@
|
|
239
271
|
- level\_tokens\[0\] can be nil if there is no params in the top level block [\#682](https://github.com/rodjek/puppet-lint/pull/682) ([rodjek](https://github.com/rodjek))
|
240
272
|
|
241
273
|
## [2.2.0](https://github.com/rodjek/puppet-lint/tree/2.2.0) (2017-03-29)
|
274
|
+
|
242
275
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.1.1...2.2.0)
|
243
276
|
|
244
277
|
**Closed issues:**
|
@@ -300,6 +333,7 @@
|
|
300
333
|
- Add LoadError to fix broken tests [\#631](https://github.com/rodjek/puppet-lint/pull/631) ([davidmogar](https://github.com/davidmogar))
|
301
334
|
|
302
335
|
## [2.1.1](https://github.com/rodjek/puppet-lint/tree/2.1.1) (2017-02-15)
|
336
|
+
|
303
337
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.1.0...2.1.1)
|
304
338
|
|
305
339
|
**Closed issues:**
|
@@ -321,6 +355,7 @@
|
|
321
355
|
- Do not test against Ruby 2.2 [\#613](https://github.com/rodjek/puppet-lint/pull/613) ([ghoneycutt](https://github.com/ghoneycutt))
|
322
356
|
|
323
357
|
## [2.1.0](https://github.com/rodjek/puppet-lint/tree/2.1.0) (2016-12-30)
|
358
|
+
|
324
359
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.2...2.1.0)
|
325
360
|
|
326
361
|
**Closed issues:**
|
@@ -378,6 +413,7 @@
|
|
378
413
|
- Adding support for logging to STDOUT as JSON [\#487](https://github.com/rodjek/puppet-lint/pull/487) ([binford2k](https://github.com/binford2k))
|
379
414
|
|
380
415
|
## [2.0.2](https://github.com/rodjek/puppet-lint/tree/2.0.2) (2016-08-19)
|
416
|
+
|
381
417
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.1...2.0.2)
|
382
418
|
|
383
419
|
**Closed issues:**
|
@@ -389,6 +425,7 @@
|
|
389
425
|
- Revert "Bugfix: properly handling $gronk-$grouik with --fix \(fix \#442\)" [\#535](https://github.com/rodjek/puppet-lint/pull/535) ([rnelson0](https://github.com/rnelson0))
|
390
426
|
|
391
427
|
## [2.0.1](https://github.com/rodjek/puppet-lint/tree/2.0.1) (2016-08-18)
|
428
|
+
|
392
429
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.0...2.0.1)
|
393
430
|
|
394
431
|
**Closed issues:**
|
@@ -575,6 +612,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
575
612
|
- Alternative to \#289: :error on either class names and defines [\#290](https://github.com/rodjek/puppet-lint/pull/290) ([ppp0](https://github.com/ppp0))
|
576
613
|
|
577
614
|
## [1.1.0](https://github.com/rodjek/puppet-lint/tree/1.1.0) (2014-09-23)
|
615
|
+
|
578
616
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/1.0.1...1.1.0)
|
579
617
|
|
580
618
|
**Closed issues:**
|
@@ -605,6 +643,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
605
643
|
- Cache parsing state in Lexer rather than recalculating [\#317](https://github.com/rodjek/puppet-lint/pull/317) ([rodjek](https://github.com/rodjek))
|
606
644
|
|
607
645
|
## [1.0.1](https://github.com/rodjek/puppet-lint/tree/1.0.1) (2014-08-20)
|
646
|
+
|
608
647
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/1.0.0...1.0.1)
|
609
648
|
|
610
649
|
**Closed issues:**
|
@@ -623,6 +662,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
623
662
|
- \[Fixes \#291\] Ignore index braces for scope variables [\#303](https://github.com/rodjek/puppet-lint/pull/303) ([dcarley](https://github.com/dcarley))
|
624
663
|
|
625
664
|
## [1.0.0](https://github.com/rodjek/puppet-lint/tree/1.0.0) (2014-08-18)
|
665
|
+
|
626
666
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.4.0.pre1...1.0.0)
|
627
667
|
|
628
668
|
**Closed issues:**
|
@@ -737,6 +777,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
737
777
|
- Add check for puppet:/// URIs without modules/ [\#166](https://github.com/rodjek/puppet-lint/pull/166) ([rodjek](https://github.com/rodjek))
|
738
778
|
|
739
779
|
## [0.4.0.pre1](https://github.com/rodjek/puppet-lint/tree/0.4.0.pre1) (2013-01-28)
|
780
|
+
|
740
781
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.2...0.4.0.pre1)
|
741
782
|
|
742
783
|
**Closed issues:**
|
@@ -752,6 +793,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
752
793
|
- Update README.md [\#168](https://github.com/rodjek/puppet-lint/pull/168) ([levilovelock](https://github.com/levilovelock))
|
753
794
|
|
754
795
|
## [0.3.2](https://github.com/rodjek/puppet-lint/tree/0.3.2) (2012-10-19)
|
796
|
+
|
755
797
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.1...0.3.2)
|
756
798
|
|
757
799
|
**Closed issues:**
|
@@ -771,6 +813,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
771
813
|
- fixes \#154 string monkeypatch failure [\#155](https://github.com/rodjek/puppet-lint/pull/155) ([vStone](https://github.com/vStone))
|
772
814
|
|
773
815
|
## [0.3.1](https://github.com/rodjek/puppet-lint/tree/0.3.1) (2012-09-26)
|
816
|
+
|
774
817
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.0...0.3.1)
|
775
818
|
|
776
819
|
**Closed issues:**
|
@@ -782,6 +825,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
782
825
|
- Fixes \#150 class inherits from params class exception [\#151](https://github.com/rodjek/puppet-lint/pull/151) ([vStone](https://github.com/vStone))
|
783
826
|
|
784
827
|
## [0.3.0](https://github.com/rodjek/puppet-lint/tree/0.3.0) (2012-09-25)
|
828
|
+
|
785
829
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.1...0.3.0)
|
786
830
|
|
787
831
|
**Closed issues:**
|
@@ -803,6 +847,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
803
847
|
- use .puppet-lint.rc, as .puppet-lintrc is deprecated [\#143](https://github.com/rodjek/puppet-lint/pull/143) ([ghoneycutt](https://github.com/ghoneycutt))
|
804
848
|
|
805
849
|
## [0.2.1](https://github.com/rodjek/puppet-lint/tree/0.2.1) (2012-08-27)
|
850
|
+
|
806
851
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.0...0.2.1)
|
807
852
|
|
808
853
|
**Closed issues:**
|
@@ -811,6 +856,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
811
856
|
- False warning : parameterised class parameter without a default value [\#137](https://github.com/rodjek/puppet-lint/issues/137)
|
812
857
|
|
813
858
|
## [0.2.0](https://github.com/rodjek/puppet-lint/tree/0.2.0) (2012-08-23)
|
859
|
+
|
814
860
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.0.pre1...0.2.0)
|
815
861
|
|
816
862
|
**Closed issues:**
|
@@ -844,6 +890,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
844
890
|
- Multiline string should not be checked for double quotes [\#51](https://github.com/rodjek/puppet-lint/issues/51)
|
845
891
|
|
846
892
|
## [0.2.0.pre1](https://github.com/rodjek/puppet-lint/tree/0.2.0.pre1) (2012-07-11)
|
893
|
+
|
847
894
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.13...0.2.0.pre1)
|
848
895
|
|
849
896
|
**Closed issues:**
|
@@ -873,6 +920,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
873
920
|
- Fix bug introduced in \#81 [\#98](https://github.com/rodjek/puppet-lint/pull/98) ([deizel](https://github.com/deizel))
|
874
921
|
|
875
922
|
## [0.1.13](https://github.com/rodjek/puppet-lint/tree/0.1.13) (2012-03-26)
|
923
|
+
|
876
924
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.12...0.1.13)
|
877
925
|
|
878
926
|
**Closed issues:**
|
@@ -893,6 +941,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
893
941
|
- Feature/symbolic filemodes \(cfr ticket \#60\) [\#62](https://github.com/rodjek/puppet-lint/pull/62) ([vStone](https://github.com/vStone))
|
894
942
|
|
895
943
|
## [0.1.12](https://github.com/rodjek/puppet-lint/tree/0.1.12) (2012-01-27)
|
944
|
+
|
896
945
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.11...0.1.12)
|
897
946
|
|
898
947
|
**Closed issues:**
|
@@ -904,9 +953,11 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
904
953
|
- turn off particular tests? .puppet-lintrc? [\#34](https://github.com/rodjek/puppet-lint/issues/34)
|
905
954
|
|
906
955
|
## [0.1.11](https://github.com/rodjek/puppet-lint/tree/0.1.11) (2012-01-11)
|
956
|
+
|
907
957
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.10...0.1.11)
|
908
958
|
|
909
959
|
## [0.1.10](https://github.com/rodjek/puppet-lint/tree/0.1.10) (2012-01-11)
|
960
|
+
|
910
961
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.9...0.1.10)
|
911
962
|
|
912
963
|
**Closed issues:**
|
@@ -920,6 +971,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
920
971
|
- Feature/unified problems [\#52](https://github.com/rodjek/puppet-lint/pull/52) ([vStone](https://github.com/vStone))
|
921
972
|
|
922
973
|
## [0.1.9](https://github.com/rodjek/puppet-lint/tree/0.1.9) (2011-12-27)
|
974
|
+
|
923
975
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.8...0.1.9)
|
924
976
|
|
925
977
|
**Merged pull requests:**
|
@@ -927,6 +979,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
927
979
|
- Consolidated option checking logic [\#48](https://github.com/rodjek/puppet-lint/pull/48) ([jamtur01](https://github.com/jamtur01))
|
928
980
|
|
929
981
|
## [0.1.8](https://github.com/rodjek/puppet-lint/tree/0.1.8) (2011-12-27)
|
982
|
+
|
930
983
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.7...0.1.8)
|
931
984
|
|
932
985
|
**Closed issues:**
|
@@ -947,6 +1000,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
947
1000
|
- Add filename as first test\(\) argument so plugins can use that too [\#39](https://github.com/rodjek/puppet-lint/pull/39) ([vStone](https://github.com/vStone))
|
948
1001
|
|
949
1002
|
## [0.1.7](https://github.com/rodjek/puppet-lint/tree/0.1.7) (2011-10-18)
|
1003
|
+
|
950
1004
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.4...0.1.7)
|
951
1005
|
|
952
1006
|
**Closed issues:**
|
@@ -958,6 +1012,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
958
1012
|
- "mode should be represented as a 4 digit octal value" when variable [\#28](https://github.com/rodjek/puppet-lint/issues/28)
|
959
1013
|
|
960
1014
|
## [0.1.4](https://github.com/rodjek/puppet-lint/tree/0.1.4) (2011-09-09)
|
1015
|
+
|
961
1016
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.3...0.1.4)
|
962
1017
|
|
963
1018
|
**Closed issues:**
|
@@ -966,9 +1021,11 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
966
1021
|
- False alignment positives [\#21](https://github.com/rodjek/puppet-lint/issues/21)
|
967
1022
|
|
968
1023
|
## [0.1.3](https://github.com/rodjek/puppet-lint/tree/0.1.3) (2011-09-09)
|
1024
|
+
|
969
1025
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.2...0.1.3)
|
970
1026
|
|
971
1027
|
## [0.1.2](https://github.com/rodjek/puppet-lint/tree/0.1.2) (2011-09-09)
|
1028
|
+
|
972
1029
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.1...0.1.2)
|
973
1030
|
|
974
1031
|
**Closed issues:**
|
@@ -977,6 +1034,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
977
1034
|
- False positive in commented line [\#22](https://github.com/rodjek/puppet-lint/issues/22)
|
978
1035
|
|
979
1036
|
## [0.1.1](https://github.com/rodjek/puppet-lint/tree/0.1.1) (2011-09-07)
|
1037
|
+
|
980
1038
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.0...0.1.1)
|
981
1039
|
|
982
1040
|
**Closed issues:**
|
@@ -985,6 +1043,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
985
1043
|
- Not detecting comma and semicolon being mixed up [\#13](https://github.com/rodjek/puppet-lint/issues/13)
|
986
1044
|
|
987
1045
|
## [0.1.0](https://github.com/rodjek/puppet-lint/tree/0.1.0) (2011-08-23)
|
1046
|
+
|
988
1047
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.7...0.1.0)
|
989
1048
|
|
990
1049
|
**Closed issues:**
|
@@ -998,9 +1057,11 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
998
1057
|
- =\> alignment warnings in selectors is broken [\#11](https://github.com/rodjek/puppet-lint/issues/11)
|
999
1058
|
|
1000
1059
|
## [0.0.7](https://github.com/rodjek/puppet-lint/tree/0.0.7) (2011-08-21)
|
1060
|
+
|
1001
1061
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.6...0.0.7)
|
1002
1062
|
|
1003
1063
|
## [0.0.6](https://github.com/rodjek/puppet-lint/tree/0.0.6) (2011-08-19)
|
1064
|
+
|
1004
1065
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.5...0.0.6)
|
1005
1066
|
|
1006
1067
|
**Closed issues:**
|
@@ -1008,6 +1069,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
1008
1069
|
- Please add logic to the \>80 chars check [\#12](https://github.com/rodjek/puppet-lint/issues/12)
|
1009
1070
|
|
1010
1071
|
## [0.0.5](https://github.com/rodjek/puppet-lint/tree/0.0.5) (2011-08-19)
|
1072
|
+
|
1011
1073
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.4...0.0.5)
|
1012
1074
|
|
1013
1075
|
**Closed issues:**
|
@@ -1017,6 +1079,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
1017
1079
|
- "single quoted string containing a variable" should check for nested quotes [\#7](https://github.com/rodjek/puppet-lint/issues/7)
|
1018
1080
|
|
1019
1081
|
## [0.0.4](https://github.com/rodjek/puppet-lint/tree/0.0.4) (2011-08-18)
|
1082
|
+
|
1020
1083
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.3...0.0.4)
|
1021
1084
|
|
1022
1085
|
**Closed issues:**
|
@@ -1026,6 +1089,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
1026
1089
|
- Nasty stacktrace when trying to run lint against a non existance file [\#4](https://github.com/rodjek/puppet-lint/issues/4)
|
1027
1090
|
|
1028
1091
|
## [0.0.3](https://github.com/rodjek/puppet-lint/tree/0.0.3) (2011-08-17)
|
1092
|
+
|
1029
1093
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.2...0.0.3)
|
1030
1094
|
|
1031
1095
|
**Closed issues:**
|
@@ -1034,6 +1098,7 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
1034
1098
|
- Empty variables break check\_strings plugin [\#2](https://github.com/rodjek/puppet-lint/issues/2)
|
1035
1099
|
|
1036
1100
|
## [0.0.2](https://github.com/rodjek/puppet-lint/tree/0.0.2) (2011-08-17)
|
1101
|
+
|
1037
1102
|
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.1...0.0.2)
|
1038
1103
|
|
1039
1104
|
**Merged pull requests:**
|
@@ -1042,5 +1107,8 @@ If the additional gems you use for checks are pinned to 1.x, you should pin pupp
|
|
1042
1107
|
|
1043
1108
|
## [0.0.1](https://github.com/rodjek/puppet-lint/tree/0.0.1) (2011-08-15)
|
1044
1109
|
|
1110
|
+
[Full Changelog](https://github.com/rodjek/puppet-lint/compare/2dd42b803a4dfc3a2398a509d26f285c9427ba41...0.0.1)
|
1111
|
+
|
1112
|
+
|
1045
1113
|
|
1046
|
-
\* *This
|
1114
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Rakefile
CHANGED
@@ -11,6 +11,8 @@ begin
|
|
11
11
|
require 'github_changelog_generator/task'
|
12
12
|
GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
|
13
13
|
version = PuppetLint::VERSION
|
14
|
+
config.user = 'rodjek'
|
15
|
+
config.project = 'puppet-lint'
|
14
16
|
config.future_release = version.to_s
|
15
17
|
config.exclude_labels = %w[duplicate question invalid wontfix release-pr documentation]
|
16
18
|
config.enhancement_labels = %w[feature]
|
data/lib/puppet-lint/data.rb
CHANGED
@@ -171,21 +171,21 @@ class PuppetLint::Data
|
|
171
171
|
tokens.select { |t| t.type == :COLON }.each do |colon_token|
|
172
172
|
next unless colon_token.next_code_token && colon_token.next_code_token.type != :LBRACE
|
173
173
|
|
174
|
-
|
175
|
-
|
174
|
+
rel_start_idx = tokens[marker..-1].index(colon_token)
|
175
|
+
break if rel_start_idx.nil?
|
176
|
+
start_idx = rel_start_idx + marker
|
176
177
|
end_token = colon_token.next_token_of([:SEMIC, :RBRACE])
|
177
|
-
|
178
|
-
|
179
|
-
|
178
|
+
rel_end_idx = tokens[start_idx..-1].index(end_token)
|
179
|
+
raise PuppetLint::SyntaxError, colon_token if rel_end_idx.nil?
|
180
|
+
marker = rel_end_idx + start_idx
|
180
181
|
|
181
182
|
result << {
|
182
183
|
:start => start_idx + 1,
|
183
|
-
:end =>
|
184
|
-
:tokens => tokens[start_idx..
|
184
|
+
:end => marker,
|
185
|
+
:tokens => tokens[start_idx..marker],
|
185
186
|
:type => find_resource_type_token(start_idx),
|
186
|
-
:param_tokens => find_resource_param_tokens(tokens[start_idx..
|
187
|
+
:param_tokens => find_resource_param_tokens(tokens[start_idx..marker]),
|
187
188
|
}
|
188
|
-
marker = end_idx
|
189
189
|
end
|
190
190
|
result
|
191
191
|
end
|
data/lib/puppet-lint/lexer.rb
CHANGED
@@ -104,6 +104,7 @@ class PuppetLint
|
|
104
104
|
:IF => true,
|
105
105
|
:ELSIF => true,
|
106
106
|
:LPAREN => true,
|
107
|
+
:EQUALS => true,
|
107
108
|
}.freeze
|
108
109
|
|
109
110
|
# Internal: some commonly used regular expressions
|
@@ -416,7 +417,7 @@ class PuppetLint
|
|
416
417
|
lexer = PuppetLint::Lexer.new
|
417
418
|
lexer.tokenise(segment[1])
|
418
419
|
lexer.tokens.each_with_index do |t, i|
|
419
|
-
type = i.zero? && t.type == :NAME ? :VARIABLE : t.type
|
420
|
+
type = i.zero? && (t.type == :NAME || KEYWORDS.include?(t.type.to_s.downcase)) ? :VARIABLE : t.type
|
420
421
|
tokens << new_token(type, t.value, :raw => t.raw)
|
421
422
|
end
|
422
423
|
when :UNENC_VAR
|
@@ -37,11 +37,11 @@ class PuppetLint
|
|
37
37
|
end_interp
|
38
38
|
elsif unenclosed_variable?
|
39
39
|
unenclosed_variable
|
40
|
-
elsif scanner.match?(ESC_DQUOTE_PATTERN)
|
41
|
-
@segment << scanner.scan(ESC_DQUOTE_PATTERN)
|
42
40
|
elsif scanner.match?(END_STRING_PATTERN)
|
43
41
|
end_string
|
44
42
|
break if interp_stack.empty?
|
43
|
+
elsif scanner.match?(ESC_DQUOTE_PATTERN)
|
44
|
+
@segment << scanner.scan(ESC_DQUOTE_PATTERN)
|
45
45
|
else
|
46
46
|
read_char
|
47
47
|
end
|
data/lib/puppet-lint/version.rb
CHANGED
@@ -246,6 +246,30 @@ describe PuppetLint::Lexer::StringSlurper do
|
|
246
246
|
end
|
247
247
|
end
|
248
248
|
|
249
|
+
context 'a variable followed by an odd number of backslashes before a double quote' do
|
250
|
+
let(:string) { '${foo}\"bar"' }
|
251
|
+
|
252
|
+
it 'does not let this double quote terminate the string' do
|
253
|
+
expect(segments).to eq([
|
254
|
+
[:STRING, ''],
|
255
|
+
[:INTERP, 'foo'],
|
256
|
+
[:STRING, '\\"bar'],
|
257
|
+
])
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
context 'a variable followed by an even number of backslashes before a double quote' do
|
262
|
+
let(:string) { '${foo}\\\\"bar"' }
|
263
|
+
|
264
|
+
it 'recognizes this double quote as the terminator' do
|
265
|
+
expect(segments).to eq([
|
266
|
+
[:STRING, ''],
|
267
|
+
[:INTERP, 'foo'],
|
268
|
+
[:STRING, '\\\\'],
|
269
|
+
])
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
249
273
|
context 'an interpolation with a complex function chain' do
|
250
274
|
let(:string) { '${key} ${flatten([$value]).join("\nkey ")}"' }
|
251
275
|
|
@@ -253,6 +253,47 @@ describe PuppetLint::Lexer do # rubocop:disable Metrics/BlockLength
|
|
253
253
|
end
|
254
254
|
end
|
255
255
|
|
256
|
+
context 'treats a variable named the same as the keyword as a variable' do
|
257
|
+
PuppetLint::Lexer::KEYWORDS.keys.each do |keyword|
|
258
|
+
context "for '#{keyword}'" do
|
259
|
+
let(:segments) do
|
260
|
+
[
|
261
|
+
[:STRING, ''],
|
262
|
+
[:INTERP, keyword],
|
263
|
+
[:STRING, ''],
|
264
|
+
]
|
265
|
+
end
|
266
|
+
|
267
|
+
it 'creates a tokenised string' do
|
268
|
+
expect(tokens).to have(3).tokens
|
269
|
+
|
270
|
+
expect(tokens[0]).to have_attributes(
|
271
|
+
:type => :DQPRE,
|
272
|
+
:value => '',
|
273
|
+
:line => 1,
|
274
|
+
:column => 1
|
275
|
+
)
|
276
|
+
expect(tokens[1]).to have_attributes(
|
277
|
+
:type => :VARIABLE,
|
278
|
+
:value => keyword,
|
279
|
+
:line => 1,
|
280
|
+
:column => 4
|
281
|
+
)
|
282
|
+
expect(tokens[2]).to have_attributes(
|
283
|
+
:type => :DQPOST,
|
284
|
+
:value => '',
|
285
|
+
:line => 1,
|
286
|
+
:column => keyword.size + 4
|
287
|
+
)
|
288
|
+
end
|
289
|
+
|
290
|
+
it 'can render the result back into a manifest' do
|
291
|
+
expect(manifest).to eq("\"${#{keyword}}\"")
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
256
297
|
context 'an interpolated variable with an unnecessary $' do
|
257
298
|
let(:segments) do
|
258
299
|
[
|
@@ -316,4 +316,18 @@ describe 'variable_scope' do
|
|
316
316
|
expect(problems).to contain_warning(msg).on_line(2).in_column(14)
|
317
317
|
end
|
318
318
|
end
|
319
|
+
|
320
|
+
context 'assigning regex with multiple alternations to variable' do
|
321
|
+
let(:code) do
|
322
|
+
<<-END
|
323
|
+
class gh::issue859 {
|
324
|
+
$regex = /5|6|7/
|
325
|
+
}
|
326
|
+
END
|
327
|
+
end
|
328
|
+
|
329
|
+
it 'should not detect any problems' do
|
330
|
+
expect(problems).to have(0).problems
|
331
|
+
end
|
332
|
+
end
|
319
333
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sharpe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Checks your Puppet manifests against the Puppetlabs
|