openvox-lint 1.0.7 → 1.3.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/CHANGELOG.md +178 -1
- data/DOCUMENTATION.md +1392 -259
- data/README.md +53 -15
- data/lib/openvox-lint/check_plugin.rb +2 -1
- data/lib/openvox-lint/checks.rb +47 -3
- data/lib/openvox-lint/cli.rb +13 -4
- data/lib/openvox-lint/configuration.rb +2 -3
- data/lib/openvox-lint/lexer.rb +23 -9
- data/lib/openvox-lint/linter.rb +25 -1
- data/lib/openvox-lint/plugins/checks/arrow_alignment.rb +38 -0
- data/lib/openvox-lint/plugins/checks/double_quoted_strings.rb +16 -0
- data/lib/openvox-lint/plugins/checks/duplicate_params.rb +2 -2
- 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 +47 -1
- data/lib/openvox-lint/plugins/checks/parameter_order.rb +2 -2
- data/lib/openvox-lint/plugins/checks/quoted_booleans.rb +21 -0
- data/lib/openvox-lint/plugins/checks/resource_reference_without_title_capital.rb +17 -2
- data/lib/openvox-lint/plugins/checks/single_quote_string_with_variables.rb +16 -0
- data/lib/openvox-lint/plugins/checks/top_scope_facts.rb +3 -1
- data/lib/openvox-lint/plugins/checks/trailing_comma.rb +20 -14
- data/lib/openvox-lint/plugins/checks/trailing_whitespace.rb +6 -0
- data/lib/openvox-lint/plugins/checks/variables_not_enclosed.rb +13 -7
- data/lib/openvox-lint/version.rb +1 -1
- data/lib/openvox-lint.rb +10 -0
- metadata +16 -12
- 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: 92a172fe1a83c3d684aee5d33ab5d77562cc7f59f226187220b4afd8c491e5b2
|
|
4
|
+
data.tar.gz: be8d992d5f9ad8773718818bf9c576e50197ed4ca3d9d0ab0d5e568f2f4a2e3f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b720a95e6dd55dea7fdef36831236fad7f586c4916fcec8e13d6e1f8668897f5261c806a525f3d46ccfbacc4291172531a40cb86f76ab2cedba51a15a7d78c85
|
|
7
|
+
data.tar.gz: 991d2849f7e848fcbd6eace4c09289ffde7509a6df96b1d447f6c4b68b83363ac5ab919627d4bde4cde0a974ca2170ae38e3150070c5d25a84ff48b367103d66
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,183 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to openvox-lint will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.0] - 2026-05-23
|
|
6
|
+
|
|
7
|
+
### Fixed / Production Readiness
|
|
8
|
+
|
|
9
|
+
- **Real `--fix` support implemented** for 5 high-value checks (previously non-functional scaffolding only; all 37 raised `NoFix`):
|
|
10
|
+
- `trailing_whitespace` — strips trailing ws from lines
|
|
11
|
+
- `hard_tabs` — replaces `\t` with two spaces
|
|
12
|
+
- `quoted_booleans` — unquotes `true`/`false` values
|
|
13
|
+
- `double_quoted_strings` — converts unnecessary `"...` (no interp/escapes) to `'...`
|
|
14
|
+
- `single_quote_string_with_variables` — converts `'...$var...` to `"...$var...`
|
|
15
|
+
- 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.
|
|
16
|
+
- **`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).
|
|
17
|
+
- Removed committed stale `openvox-lint-1.0.8.gem` (violated `.gitignore`).
|
|
18
|
+
- **Version/doc sync**: All references now 1.3.0 (source, docs header, comparison table, this changelog). Bumped for the --fix + hygiene milestone.
|
|
19
|
+
- Updated README links and comparison to point to canonical OpenVox style guide and note real --fix status.
|
|
20
|
+
- 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.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- `--fix` now production-usable for the listed checks (edits in place like puppet-lint).
|
|
24
|
+
- Style guide references prioritize OpenVox canonical docs.
|
|
25
|
+
|
|
26
|
+
### Contributors (for 1.3.0)
|
|
27
|
+
- Grok Build (lead modernization per full analysis reports)
|
|
28
|
+
|
|
29
|
+
## [1.2.0] - 2026-03-12
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **`legacy_facts` false positives on local variables** — The check no longer
|
|
34
|
+
flags class/define parameters or lambda block parameters that happen to share
|
|
35
|
+
names with legacy facts (`$path`, `$type`, `$os`, etc.). Previously, any
|
|
36
|
+
variable with a legacy fact name would trigger a warning, even when it was
|
|
37
|
+
clearly a locally-scoped parameter with no relation to facts.
|
|
38
|
+
|
|
39
|
+
**Contributed by [@hbro](https://github.com/hbro) (Hans Broeckx)** in
|
|
40
|
+
[PR #1](https://github.com/cvquesty/openvox-lint/pull/1). This is openvox-lint's
|
|
41
|
+
first community contribution! 🎉
|
|
42
|
+
|
|
43
|
+
The fix adds a pre-scan phase that collects all locally declared variable names
|
|
44
|
+
from:
|
|
45
|
+
- Class and defined type parameter lists
|
|
46
|
+
- Lambda block parameter lists (`|$var|`)
|
|
47
|
+
|
|
48
|
+
These local variables are then excluded from the legacy fact name check,
|
|
49
|
+
eliminating false positives while still correctly detecting actual legacy
|
|
50
|
+
fact references.
|
|
51
|
+
|
|
52
|
+
### Contributors
|
|
53
|
+
|
|
54
|
+
- **Hans Broeckx ([@hbro](https://github.com/hbro))** — First community contributor!
|
|
55
|
+
|
|
56
|
+
## [1.1.1] - 2026-03-12
|
|
57
|
+
|
|
58
|
+
### Documentation
|
|
59
|
+
|
|
60
|
+
- **Comprehensive technical documentation rewrite**: Complete overhaul of
|
|
61
|
+
[DOCUMENTATION.md](DOCUMENTATION.md) with:
|
|
62
|
+
- Full API reference for all classes (Token, Lexer, CheckPlugin, Configuration,
|
|
63
|
+
Linter, Report)
|
|
64
|
+
- Complete documentation for all 37 checks with good/bad code examples
|
|
65
|
+
- Organized checks by category (Whitespace, Strings, Variables, Resources, etc.)
|
|
66
|
+
- Comprehensive token types reference
|
|
67
|
+
- Plugin development guide with examples
|
|
68
|
+
- Migration guide from puppet-lint
|
|
69
|
+
|
|
70
|
+
- **New CONTRIBUTING.md**: Added comprehensive contributor guide with:
|
|
71
|
+
- Development setup instructions
|
|
72
|
+
- Project structure documentation
|
|
73
|
+
- Testing instructions
|
|
74
|
+
- Check plugin writing guide
|
|
75
|
+
- Coding standards
|
|
76
|
+
- Release process
|
|
77
|
+
|
|
78
|
+
- **Hiera 3 → Hiera 5 clarification**: Updated all documentation to clarify
|
|
79
|
+
that Hiera 3 is fully deprecated and only Hiera 5 is supported in Puppet 8 /
|
|
80
|
+
OpenVox 8. The `hiera3_function` check now explicitly references "Hiera 5
|
|
81
|
+
lookup()" as the replacement.
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
|
|
85
|
+
- **`hiera3_function` error message**: Improved to explicitly mention Hiera 5:
|
|
86
|
+
"deprecated Hiera 3 function 'hiera()' — use Hiera 5 lookup() instead"
|
|
87
|
+
|
|
88
|
+
## [1.1.0] - 2026-03-05
|
|
89
|
+
|
|
90
|
+
### Removed
|
|
91
|
+
|
|
92
|
+
- **`relative_classname_inclusion` check**: This check warned when
|
|
93
|
+
`include`, `require`, or `contain` statements used relative (non-`::`)
|
|
94
|
+
multi-segment class names instead of fully qualified ones. Since
|
|
95
|
+
Puppet 4, the Puppet language resolver correctly handles relative class
|
|
96
|
+
name resolution, making relative class name inclusion safe and the
|
|
97
|
+
check obsolete. The check has been removed entirely. Users who had
|
|
98
|
+
disabled it via `--no-relative_classname_inclusion-check` or
|
|
99
|
+
`.openvox-lint.rc` can safely remove those overrides.
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- **Check count**: 38 → 37 built-in checks.
|
|
104
|
+
|
|
105
|
+
## [1.0.8] - 2026-03-04
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- **CLI: stale configuration on re-invocation**: The global configuration
|
|
110
|
+
singleton is now reset at the start of every `CLI#run`. Repeated
|
|
111
|
+
invocations in the same Ruby process (Vim plugins, guard, Rake loops)
|
|
112
|
+
no longer inherit stale `disabled_checks`, `only_checks`, or other
|
|
113
|
+
settings from a previous run.
|
|
114
|
+
|
|
115
|
+
- **CLI: `--config` flag ignored when local RC exists**: The `-c` /
|
|
116
|
+
`--config FILE` flag now takes strict priority. Previously a local
|
|
117
|
+
`.openvox-lint.rc` would shadow an explicit `--config` path.
|
|
118
|
+
|
|
119
|
+
- **lint:ignore / lint:endignore block suppression**: Block-style ignore
|
|
120
|
+
comments now work as documented. `# lint:ignore:check_name` on its
|
|
121
|
+
own line opens a suppression block; `# lint:endignore` closes it.
|
|
122
|
+
All problems on lines between the two comments are suppressed for
|
|
123
|
+
the named checks. Inline ignore comments (on the same line as code)
|
|
124
|
+
continue to work as before.
|
|
125
|
+
|
|
126
|
+
- **ignore-paths glob matching with relative/absolute prefixes**: The
|
|
127
|
+
`--ignore-paths` glob patterns (and the defaults `vendor/**/*.pp`,
|
|
128
|
+
`pkg/**/*.pp`, `spec/**/*.pp`) now match correctly regardless of
|
|
129
|
+
whether the file was discovered via `./vendor/foo.pp`, `vendor/foo.pp`,
|
|
130
|
+
or an absolute path.
|
|
131
|
+
|
|
132
|
+
- **trailing_comma false positives on non-resource braces**: The
|
|
133
|
+
`trailing_comma` check now only fires inside resource bodies
|
|
134
|
+
(`name { ... }`). It no longer produces false positives on `if`,
|
|
135
|
+
`unless`, `case`, class bodies, or other brace-delimited contexts
|
|
136
|
+
where a trailing comma is not expected.
|
|
137
|
+
|
|
138
|
+
- **arrow_alignment / space_before_arrow contradictory warnings**: The
|
|
139
|
+
`arrow_alignment` check now defers to `space_before_arrow` when the
|
|
140
|
+
misalignment in a group is caused by the longest key having extra
|
|
141
|
+
whitespace. This eliminates contradictory double-warnings on the
|
|
142
|
+
same resource block.
|
|
143
|
+
|
|
144
|
+
- **Unterminated strings and regex now reported as errors**: The lexer
|
|
145
|
+
now raises `OpenvoxLint::Error` when a single-quoted string,
|
|
146
|
+
double-quoted string, or regex literal is not terminated before
|
|
147
|
+
end-of-file. Previously the lexer silently produced a truncated
|
|
148
|
+
token covering the rest of the file, leading to wrong lint results.
|
|
149
|
+
|
|
150
|
+
- **Multi-line string tokens now report correct line number**: String
|
|
151
|
+
tokens that span multiple lines now record the **starting** line
|
|
152
|
+
number, not the ending line. Checks that flag these tokens now
|
|
153
|
+
point to the correct source location.
|
|
154
|
+
|
|
155
|
+
- **variables_not_enclosed mixed variable handling**: Strings containing
|
|
156
|
+
both enclosed (`${bar}`) and unenclosed (`$foo`) variables now
|
|
157
|
+
correctly flag only the unenclosed references. Previously the
|
|
158
|
+
entire string was skipped if any `${...}` pattern was present.
|
|
159
|
+
|
|
160
|
+
- **resource_reference_without_title_capital expanded allowlist**: The
|
|
161
|
+
function allowlist that prevents false positives on `name[...]`
|
|
162
|
+
patterns now covers 40+ Puppet built-in and stdlib functions
|
|
163
|
+
(`each`, `map`, `filter`, `reduce`, `lookup`, `dig`, etc.),
|
|
164
|
+
not just the original 5.
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
|
|
168
|
+
- **duplicate_params / parameter_order: removed dead code**: Both checks
|
|
169
|
+
contained `.formatting?` guard clauses that could never trigger
|
|
170
|
+
because they operate on pre-filtered semantic tokens. The dead code
|
|
171
|
+
has been removed for clarity.
|
|
172
|
+
|
|
173
|
+
- **Check registry duplicate warning**: `OpenvoxLint.new_check` now
|
|
174
|
+
emits a warning to stderr (when `OPENVOX_LINT_DEBUG` is set) if a
|
|
175
|
+
check name that is already registered is overwritten. This helps
|
|
176
|
+
detect accidental name collisions in custom check plugins.
|
|
177
|
+
|
|
178
|
+
- **Gemfile cleaned up**: Removed duplicate gem declarations that were
|
|
179
|
+
listed in both the Gemfile `group` block and the gemspec
|
|
180
|
+
`add_development_dependency` entries.
|
|
181
|
+
|
|
5
182
|
## [1.0.7] - 2026-02-25
|
|
6
183
|
|
|
7
184
|
### Changed
|
|
@@ -69,7 +246,7 @@ All notable changes to openvox-lint will be documented in this file.
|
|
|
69
246
|
- **Resources**: `ensure_first_param`, `ensure_not_symlink_target`, `file_mode`, `unquoted_file_mode`, `unquoted_resource_title`, `duplicate_params`, `trailing_comma`
|
|
70
247
|
- **Classes**: `documentation`, `nested_classes_or_defines`, `parameter_order`, `class_inherits_params`, `inherits_across_namespaces`
|
|
71
248
|
- **Conditionals**: `case_without_default`, `selector_inside_resource`
|
|
72
|
-
- **References**: `leading_zero`, `resource_reference_without_title_capital`, `
|
|
249
|
+
- **References**: `leading_zero`, `resource_reference_without_title_capital`, `autoloader_layout`
|
|
73
250
|
- **Comments**: `star_comments`
|
|
74
251
|
- **URLs**: `puppet_url_without_modules`
|
|
75
252
|
- **Nodes**: `node_name_unquoted`
|