openvox-lint 1.0.8 → 1.3.1
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/CHANGELOG.md +109 -1
- data/DOCUMENTATION.md +1383 -250
- data/README.md +45 -14
- data/lib/openvox-lint/check_plugin.rb +6 -0
- data/lib/openvox-lint/checks.rb +22 -9
- data/lib/openvox-lint/linter.rb +18 -0
- data/lib/openvox-lint/plugins/checks/double_quoted_strings.rb +16 -0
- data/lib/openvox-lint/plugins/checks/hard_tabs.rb +7 -0
- data/lib/openvox-lint/plugins/checks/hiera3_function.rb +13 -3
- data/lib/openvox-lint/plugins/checks/legacy_facts.rb +44 -0
- data/lib/openvox-lint/plugins/checks/quoted_booleans.rb +21 -0
- data/lib/openvox-lint/plugins/checks/single_quote_string_with_variables.rb +16 -0
- data/lib/openvox-lint/plugins/checks/trailing_whitespace.rb +6 -0
- data/lib/openvox-lint/version.rb +1 -1
- metadata +14 -10
- data/lib/openvox-lint/plugins/checks/relative_classname_inclusion.rb +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c93dcb31a47e58c1ff171d798789c1bfdc202cf9d0f950c6eb35c0942eeaa8ca
|
|
4
|
+
data.tar.gz: 3bf2d9f13f3bc7e39f651626f1c4dcb22b628d45e5a330e146a14d2c3ec9e138
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e685e7c01d060ae7d1235ebb8d3164e0eac81a72ec0e4cb63f214aca7acde911ad16cc79c5fcbd0f5994d796a6ce8be13f62a43aba92e4c8c1e9d6126dc172e0
|
|
7
|
+
data.tar.gz: 0b789ecf9210c095ab2c5abb128583e3fd7717aede849a45b0cf5ffc5419fc59d7b62a6ad4fc79495841fce369581fb67ad657a04bc60cdf666e105e3ad0259d
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to openvox-lint will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.1] - 2026-05-23
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Critical false positive in `unquoted_resource_title`: resource types (e.g. `file`) inside `class { ... }` or `define { ... }` bodies were incorrectly reported as unquoted titles.
|
|
9
|
+
- `lint:ignore` parser now correctly handles multiple `lint:ignore:check` directives on a single comment line (space or comma separated) and bare `lint:ignore`.
|
|
10
|
+
- Added comprehensive regression tests for the above fixes plus real `--fix` verification for the five supported checks.
|
|
11
|
+
- Expanded unit test coverage across many previously untested checks and edge cases (legacy facts in lambdas/parameters, etc.).
|
|
12
|
+
|
|
13
|
+
## [1.3.0] - 2026-05-23
|
|
14
|
+
|
|
15
|
+
### Fixed / Production Readiness
|
|
16
|
+
|
|
17
|
+
- **Real `--fix` support implemented** for 5 high-value checks (previously non-functional scaffolding only; all 37 raised `NoFix`):
|
|
18
|
+
- `trailing_whitespace` — strips trailing ws from lines
|
|
19
|
+
- `hard_tabs` — replaces `\t` with two spaces
|
|
20
|
+
- `quoted_booleans` — unquotes `true`/`false` values
|
|
21
|
+
- `double_quoted_strings` — converts unnecessary `"...` (no interp/escapes) to `'...`
|
|
22
|
+
- `single_quote_string_with_variables` — converts `'...$var...` to `"...$var...`
|
|
23
|
+
- Linter now writes mutated `manifest_lines` back to disk on `--fix` (with final-NL normalization per style guide). Fixes are line-based and safe; complex structural fixes (arrow_alignment) remain future work. Tested on real manifests.
|
|
24
|
+
- **`legacy_facts` crash fixed** (in active workspace): `require 'set'` present + exclusion logic for local class/define params and `|$var|` lambdas fully verified (no false positives, no NameError).
|
|
25
|
+
- Removed committed stale `openvox-lint-1.0.8.gem` (violated `.gitignore`).
|
|
26
|
+
- **Version/doc sync**: All references now 1.3.1 (source, docs header, comparison table, this changelog). Bumped for the --fix + hygiene milestone.
|
|
27
|
+
- Updated README links and comparison to point to canonical OpenVox style guide and note real --fix status.
|
|
28
|
+
- Architecture decision: retained OpenVox's lightweight `CheckPlugin` + depth-aware helpers (superior to puppet-lint Data for some cases); added minimal mutation support for fixes without porting heavy token-rewiring singleton.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- `--fix` now production-usable for the listed checks (edits in place like puppet-lint).
|
|
32
|
+
- Style guide references prioritize OpenVox canonical docs.
|
|
33
|
+
|
|
34
|
+
### Contributors (for 1.3.0 modernization)
|
|
35
|
+
- Grok Build (lead modernization per full analysis reports)
|
|
36
|
+
|
|
37
|
+
## [1.2.0] - 2026-03-12
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **`legacy_facts` false positives on local variables** — The check no longer
|
|
42
|
+
flags class/define parameters or lambda block parameters that happen to share
|
|
43
|
+
names with legacy facts (`$path`, `$type`, `$os`, etc.). Previously, any
|
|
44
|
+
variable with a legacy fact name would trigger a warning, even when it was
|
|
45
|
+
clearly a locally-scoped parameter with no relation to facts.
|
|
46
|
+
|
|
47
|
+
**Contributed by [@hbro](https://github.com/hbro) (Hans Broeckx)** in
|
|
48
|
+
[PR #1](https://github.com/cvquesty/openvox-lint/pull/1). This is openvox-lint's
|
|
49
|
+
first community contribution! 🎉
|
|
50
|
+
|
|
51
|
+
The fix adds a pre-scan phase that collects all locally declared variable names
|
|
52
|
+
from:
|
|
53
|
+
- Class and defined type parameter lists
|
|
54
|
+
- Lambda block parameter lists (`|$var|`)
|
|
55
|
+
|
|
56
|
+
These local variables are then excluded from the legacy fact name check,
|
|
57
|
+
eliminating false positives while still correctly detecting actual legacy
|
|
58
|
+
fact references.
|
|
59
|
+
|
|
60
|
+
### Contributors
|
|
61
|
+
|
|
62
|
+
- **Hans Broeckx ([@hbro](https://github.com/hbro))** — First community contributor!
|
|
63
|
+
|
|
64
|
+
## [1.1.1] - 2026-03-12
|
|
65
|
+
|
|
66
|
+
### Documentation
|
|
67
|
+
|
|
68
|
+
- **Comprehensive technical documentation rewrite**: Complete overhaul of
|
|
69
|
+
[DOCUMENTATION.md](DOCUMENTATION.md) with:
|
|
70
|
+
- Full API reference for all classes (Token, Lexer, CheckPlugin, Configuration,
|
|
71
|
+
Linter, Report)
|
|
72
|
+
- Complete documentation for all 37 checks with good/bad code examples
|
|
73
|
+
- Organized checks by category (Whitespace, Strings, Variables, Resources, etc.)
|
|
74
|
+
- Comprehensive token types reference
|
|
75
|
+
- Plugin development guide with examples
|
|
76
|
+
- Migration guide from puppet-lint
|
|
77
|
+
|
|
78
|
+
- **New CONTRIBUTING.md**: Added comprehensive contributor guide with:
|
|
79
|
+
- Development setup instructions
|
|
80
|
+
- Project structure documentation
|
|
81
|
+
- Testing instructions
|
|
82
|
+
- Check plugin writing guide
|
|
83
|
+
- Coding standards
|
|
84
|
+
- Release process
|
|
85
|
+
|
|
86
|
+
- **Hiera 3 → Hiera 5 clarification**: Updated all documentation to clarify
|
|
87
|
+
that Hiera 3 is fully deprecated and only Hiera 5 is supported in Puppet 8 /
|
|
88
|
+
OpenVox 8. The `hiera3_function` check now explicitly references "Hiera 5
|
|
89
|
+
lookup()" as the replacement.
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
|
|
93
|
+
- **`hiera3_function` error message**: Improved to explicitly mention Hiera 5:
|
|
94
|
+
"deprecated Hiera 3 function 'hiera()' — use Hiera 5 lookup() instead"
|
|
95
|
+
|
|
96
|
+
## [1.1.0] - 2026-03-05
|
|
97
|
+
|
|
98
|
+
### Removed
|
|
99
|
+
|
|
100
|
+
- **`relative_classname_inclusion` check**: This check warned when
|
|
101
|
+
`include`, `require`, or `contain` statements used relative (non-`::`)
|
|
102
|
+
multi-segment class names instead of fully qualified ones. Since
|
|
103
|
+
Puppet 4, the Puppet language resolver correctly handles relative class
|
|
104
|
+
name resolution, making relative class name inclusion safe and the
|
|
105
|
+
check obsolete. The check has been removed entirely. Users who had
|
|
106
|
+
disabled it via `--no-relative_classname_inclusion-check` or
|
|
107
|
+
`.openvox-lint.rc` can safely remove those overrides.
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- **Check count**: 38 → 37 built-in checks.
|
|
112
|
+
|
|
5
113
|
## [1.0.8] - 2026-03-04
|
|
6
114
|
|
|
7
115
|
### Fixed
|
|
@@ -146,7 +254,7 @@ All notable changes to openvox-lint will be documented in this file.
|
|
|
146
254
|
- **Resources**: `ensure_first_param`, `ensure_not_symlink_target`, `file_mode`, `unquoted_file_mode`, `unquoted_resource_title`, `duplicate_params`, `trailing_comma`
|
|
147
255
|
- **Classes**: `documentation`, `nested_classes_or_defines`, `parameter_order`, `class_inherits_params`, `inherits_across_namespaces`
|
|
148
256
|
- **Conditionals**: `case_without_default`, `selector_inside_resource`
|
|
149
|
-
- **References**: `leading_zero`, `resource_reference_without_title_capital`, `
|
|
257
|
+
- **References**: `leading_zero`, `resource_reference_without_title_capital`, `autoloader_layout`
|
|
150
258
|
- **Comments**: `star_comments`
|
|
151
259
|
- **URLs**: `puppet_url_without_modules`
|
|
152
260
|
- **Nodes**: `node_name_unquoted`
|