openvox-lint 1.3.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92a172fe1a83c3d684aee5d33ab5d77562cc7f59f226187220b4afd8c491e5b2
4
- data.tar.gz: be8d992d5f9ad8773718818bf9c576e50197ed4ca3d9d0ab0d5e568f2f4a2e3f
3
+ metadata.gz: c93dcb31a47e58c1ff171d798789c1bfdc202cf9d0f950c6eb35c0942eeaa8ca
4
+ data.tar.gz: 3bf2d9f13f3bc7e39f651626f1c4dcb22b628d45e5a330e146a14d2c3ec9e138
5
5
  SHA512:
6
- metadata.gz: b720a95e6dd55dea7fdef36831236fad7f586c4916fcec8e13d6e1f8668897f5261c806a525f3d46ccfbacc4291172531a40cb86f76ab2cedba51a15a7d78c85
7
- data.tar.gz: 991d2849f7e848fcbd6eace4c09289ffde7509a6df96b1d447f6c4b68b83363ac5ab919627d4bde4cde0a974ca2170ae38e3150070c5d25a84ff48b367103d66
6
+ metadata.gz: e685e7c01d060ae7d1235ebb8d3164e0eac81a72ec0e4cb63f214aca7acde911ad16cc79c5fcbd0f5994d796a6ce8be13f62a43aba92e4c8c1e9d6126dc172e0
7
+ data.tar.gz: 0b789ecf9210c095ab2c5abb128583e3fd7717aede849a45b0cf5ffc5419fc59d7b62a6ad4fc79495841fce369581fb67ad657a04bc60cdf666e105e3ad0259d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
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
+
5
13
  ## [1.3.0] - 2026-05-23
6
14
 
7
15
  ### Fixed / Production Readiness
@@ -15,7 +23,7 @@ All notable changes to openvox-lint will be documented in this file.
15
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.
16
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).
17
25
  - 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.
26
+ - **Version/doc sync**: All references now 1.3.1 (source, docs header, comparison table, this changelog). Bumped for the --fix + hygiene milestone.
19
27
  - Updated README links and comparison to point to canonical OpenVox style guide and note real --fix status.
20
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.
21
29
 
@@ -23,7 +31,7 @@ All notable changes to openvox-lint will be documented in this file.
23
31
  - `--fix` now production-usable for the listed checks (edits in place like puppet-lint).
24
32
  - Style guide references prioritize OpenVox canonical docs.
25
33
 
26
- ### Contributors (for 1.3.0)
34
+ ### Contributors (for 1.3.0 modernization)
27
35
  - Grok Build (lead modernization per full analysis reports)
28
36
 
29
37
  ## [1.2.0] - 2026-03-12
data/DOCUMENTATION.md CHANGED
@@ -10,7 +10,7 @@ reported in multiple output formats suitable for humans, CI systems, and IDEs.
10
10
  This document covers the architecture, every public API, every built-in check,
11
11
  the lexer token types, the plugin system, and integration guidance.
12
12
 
13
- **Version:** 1.3.0
13
+ **Version:** 1.3.1
14
14
  **Checks:** 37 built-in (with real --fix support for 5+ checks)
15
15
  **License:** Apache 2.0
16
16
  **Compatibility:** OpenVox 8.x, Puppet 8.x, Puppet 7.x (with deprecation warnings)
@@ -94,7 +94,7 @@ The top-level namespace for all openvox-lint classes.
94
94
 
95
95
  | Constant | Value | Description |
96
96
  |----------|-------|-------------|
97
- | `VERSION` | `'1.3.0'` | Gem version string |
97
+ | `VERSION` | `'1.3.1'` | Gem version string |
98
98
 
99
99
  #### Class Methods
100
100
 
data/README.md CHANGED
@@ -638,7 +638,7 @@ openvox-lint/
638
638
 
639
639
  ## Comparison with puppet-lint
640
640
 
641
- | Feature | puppet-lint 5.x | openvox-lint 1.3.0 |
641
+ | Feature | puppet-lint 5.x | openvox-lint 1.3.1 |
642
642
  |---------|-----------------|------------------|
643
643
  | Ruby requirement | ≥ 3.1 | ≥ 2.5 (RHEL 8, macOS, all modern platforms) |
644
644
  | Runtime dependencies | None | None |
@@ -141,6 +141,12 @@ module OpenvoxLint
141
141
  results = []; sem = semantic_tokens
142
142
  sem.each_with_index do |tok, i|
143
143
  if tok.type == :LBRACE && i > 0 && sem[i - 1].type == :NAME
144
+ # Skip the opening brace of class/define/node bodies.
145
+ # Their name token before { is not a resource type; the next
146
+ # statement (often another resource) would otherwise be
147
+ # misinterpreted as an "unquoted resource title".
148
+ next if i >= 2 && [:CLASS, :DEFINE, :NODE].include?(sem[i-2]&.type)
149
+
144
150
  j = i + 1
145
151
  results << sem[j] if j < sem.length && %i[SSTRING STRING NAME VARIABLE].include?(sem[j].type)
146
152
  end
@@ -43,15 +43,34 @@ module OpenvoxLint
43
43
  @tokens.each do |tok|
44
44
  next unless tok.type == :COMMENT
45
45
 
46
- if tok.value =~ /lint:endignore/
46
+ comment_text = tok.value.to_s
47
+
48
+ if comment_text =~ /lint:endignore/i
47
49
  # Close the most recent open block
48
50
  block = open_blocks.pop
49
51
  if block
50
52
  block[:end_line] = tok.line
51
53
  results << block
52
54
  end
53
- elsif tok.value =~ /lint:ignore:(.+)/
54
- checks = Regexp.last_match(1).strip.split(/\s*,\s*/)
55
+ elsif comment_text =~ /lint:ignore/i
56
+ # Robust extraction: find every "lint:ignore:" and take the following name(s)
57
+ # until the next "lint:" directive or end of comment.
58
+ checks = []
59
+ text = comment_text
60
+ while (idx = text.index(/lint:ignore:/i))
61
+ # Take from after this directive until the next directive or end
62
+ remaining = text[idx + 'lint:ignore:'.length .. -1]
63
+ next_dir = remaining.index(/lint:/i) || remaining.length
64
+ chunk = remaining[0...next_dir]
65
+ checks += chunk.split(/[,\s]+/).map { |s| s.strip.tr('-', '_').downcase }.reject(&:empty?)
66
+ # Advance past this directive for the next search
67
+ text = text[idx + 1 .. -1] || ''
68
+ end
69
+ checks.uniq!
70
+ if comment_text =~ /lint:ignore(?!\s*:)/i && checks.empty?
71
+ checks = []
72
+ end
73
+
55
74
  # If there's code on the same line before this comment, treat
56
75
  # it as inline-only (same line). Otherwise open a block.
57
76
  if inline_ignore?(tok)
@@ -59,12 +78,6 @@ module OpenvoxLint
59
78
  else
60
79
  open_blocks.push({ start_line: tok.line, end_line: nil, checks: checks })
61
80
  end
62
- elsif tok.value =~ /lint:ignore\b/
63
- if inline_ignore?(tok)
64
- results << { start_line: tok.line, end_line: tok.line, checks: [] }
65
- else
66
- open_blocks.push({ start_line: tok.line, end_line: nil, checks: [] })
67
- end
68
81
  end
69
82
  end
70
83
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenvoxLint
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvox-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerald Sheets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-23 00:00:00.000000000 Z
11
+ date: 2026-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake