Skip to content

fix(experimental/seclang): resolve golangci-lint failures in parser_v2#1501

Merged
fzipi merged 3 commits intofeature/experimental-seclangfrom
copilot/sub-pr-1500
Feb 28, 2026
Merged

fix(experimental/seclang): resolve golangci-lint failures in parser_v2#1501
fzipi merged 3 commits intofeature/experimental-seclangfrom
copilot/sub-pr-1500

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

Four lint violations introduced in the experimental ANTLR4 parser were breaking CI (golangci-lint via gocritic + unused checks).

Changes

  • Remove unused const maxIncludeRecursion — declared but never referenced
  • Remove unused Parser.includeCount field — never read or written
  • Remove unused typeConverter.errors field — never populated or consumed
  • Fix appendAssign (gocritic) — replace single-line cross-slice append with two-statement form so the result is assigned back to the same slice variable:
// before — triggers appendAssign warning
allErrors := append(lexerErrorListener.errors, parserErrorListener.errors...)

// after
allErrors := lexerErrorListener.errors
allErrors = append(allErrors, parserErrorListener.errors...)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 27, 2026 16:04
Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement TypeConverter for SecLang parser fix(experimental/seclang): resolve golangci-lint failures in parser_v2 Feb 27, 2026
@fzipi fzipi marked this pull request as ready for review February 27, 2026 16:55
@fzipi fzipi requested a review from a team as a code owner February 27, 2026 16:55
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.25%. Comparing base (0f454fb) to head (c232e96).
⚠️ Report is 6 commits behind head on feature/experimental-seclang.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/experimental-seclang    #1501   +/-   ##
=============================================================
  Coverage                         82.24%   82.25%           
=============================================================
  Files                               176      176           
  Lines                              9228     9229    +1     
=============================================================
+ Hits                               7590     7591    +1     
  Misses                             1324     1324           
  Partials                            314      314           
Flag Coverage Δ
coraza.rule.case_sensitive_args_keys 82.21% <100.00%> (+<0.01%) ⬆️
coraza.rule.mandatory_rule_id_check 82.24% <100.00%> (+<0.01%) ⬆️
coraza.rule.multiphase_evaluation 81.99% <100.00%> (+<0.01%) ⬆️
coraza.rule.no_regex_multiline 82.24% <100.00%> (+<0.01%) ⬆️
default 82.25% <100.00%> (+<0.01%) ⬆️
examples+ 16.64% <ø> (ø)
examples+coraza.rule.case_sensitive_args_keys 82.15% <100.00%> (+<0.01%) ⬆️
examples+coraza.rule.mandatory_rule_id_check 82.24% <100.00%> (+<0.01%) ⬆️
examples+coraza.rule.multiphase_evaluation 81.80% <100.00%> (+<0.01%) ⬆️
examples+coraza.rule.no_regex_multiline 82.09% <100.00%> (+<0.01%) ⬆️
examples+memoize_builders 82.18% <100.00%> (+<0.01%) ⬆️
examples+no_fs_access 80.03% <100.00%> (+<0.01%) ⬆️
ftw 82.25% <100.00%> (+<0.01%) ⬆️
memoize_builders 82.34% <100.00%> (+<0.01%) ⬆️
no_fs_access 81.81% <100.00%> (+<0.01%) ⬆️
tinygo 82.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fzipi fzipi merged commit 91bee49 into feature/experimental-seclang Feb 28, 2026
134 checks passed
@fzipi fzipi deleted the copilot/sub-pr-1500 branch February 28, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants