Skip to content

chore: satisfy lints#6565

Merged
Mzack9999 merged 1 commit intodevfrom
dwisiswant0/chore/satisfy-lints
Oct 30, 2025
Merged

chore: satisfy lints#6565
Mzack9999 merged 1 commit intodevfrom
dwisiswant0/chore/satisfy-lints

Conversation

@dwisiswant0
Copy link
Member

@dwisiswant0 dwisiswant0 commented Oct 30, 2025

Proposed changes

Fixes #6566

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Summary by CodeRabbit

  • Chores
    • Updated build system configuration to modern standards across the codebase.
    • Enhanced debug message formatting for improved troubleshooting capabilities.

Signed-off-by: Dwi Siswanto <git@dw1.io>
@auto-assign auto-assign bot requested a review from Mzack9999 October 30, 2025 02:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

This pull request modernizes Go build tag syntax across six files by removing legacy // +build directives while retaining Go 1.17+ //go:build constraints. Additionally, a minor fix improves variadic argument handling in DSL debug output formatting.

Changes

Cohort / File(s) Summary
Build tag syntax modernization
lib/example_test.go, pkg/scan/events/scan_noop.go, pkg/scan/events/stats_build.go, pkg/utils/json/json.go, pkg/utils/json/json_fallback.go
Removes legacy // +build directives while preserving Go 1.17+ //go:build constraints. No runtime or logic changes.
DSL debug formatting
pkg/operators/common/dsl/dsl.go
Changes fmt.Sprint(args) to fmt.Sprint(args...) in PrintDebugCallback to properly unpack variadic arguments into the format string.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Build tag changes are repetitive and syntactic, requiring minimal review per file
  • DSL debug fix is a straightforward variadic argument unpacking correction
  • No exported APIs or control flow are affected

Poem

🐰 Old build tags fade to gray,
Modern syntax saves the day,
Args unpack with a spread so fine,
Go 1.17 does divine! ✨
Hopping forward, clean and bright.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore: satisfy lints" is directly related to the changeset. The changes consist primarily of updating build tag syntax from legacy "// +build" directives to modern "//go:build" constraints across multiple files, which aligns with satisfying linting tools that prefer the newer Go 1.17+ syntax standards. The title accurately characterizes the intent of the changes and is sufficiently clear and specific enough that a developer scanning the history would understand this is a maintenance/linting fix PR.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dwisiswant0/chore/satisfy-lints

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3be27b9 and dd8946d.

📒 Files selected for processing (6)
  • lib/example_test.go (0 hunks)
  • pkg/operators/common/dsl/dsl.go (1 hunks)
  • pkg/scan/events/scan_noop.go (0 hunks)
  • pkg/scan/events/stats_build.go (0 hunks)
  • pkg/utils/json/json.go (0 hunks)
  • pkg/utils/json/json_fallback.go (0 hunks)
💤 Files with no reviewable changes (5)
  • pkg/scan/events/stats_build.go
  • pkg/utils/json/json.go
  • pkg/scan/events/scan_noop.go
  • lib/example_test.go
  • pkg/utils/json/json_fallback.go
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.go: Format Go code using go fmt
Run static analysis with go vet

Files:

  • pkg/operators/common/dsl/dsl.go
🧠 Learnings (1)
📚 Learning: 2025-07-16T21:27:14.937Z
Learnt from: hdm
PR: projectdiscovery/nuclei#6322
File: pkg/templates/compile.go:79-81
Timestamp: 2025-07-16T21:27:14.937Z
Learning: To make the template caching mechanism in pkg/templates/compile.go production-ready, DSLs need to be updated to use runtime options instead of cached variables, rather than restoring the Compile() calls on each request.

Applied to files:

  • pkg/operators/common/dsl/dsl.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: perf-regression / perf-regression
  • GitHub Check: Functional tests (windows-latest)
  • GitHub Check: Functional tests (macOS-latest)
  • GitHub Check: Functional tests (ubuntu-latest)
  • GitHub Check: Flamegraph
  • GitHub Check: Template validate
  • GitHub Check: Release test
  • GitHub Check: CodeQL analysis
  • GitHub Check: Integration tests (macOS-latest)
  • GitHub Check: Integration tests (windows-latest)
  • GitHub Check: Integration tests (ubuntu-latest)
🔇 Additional comments (1)
pkg/operators/common/dsl/dsl.go (1)

117-120: LGTM! Correct variadic argument forwarding.

The change from fmt.Sprint(args) to fmt.Sprint(args...) correctly expands the variadic arguments when forwarding them to fmt.Sprint. This ensures proper formatting of debug messages rather than printing the slice representation.


Comment @coderabbitai help to get the list of available commands and usage tips.

@Mzack9999 Mzack9999 merged commit b625a65 into dev Oct 30, 2025
20 checks passed
@Mzack9999 Mzack9999 deleted the dwisiswant0/chore/satisfy-lints branch October 30, 2025 10:58
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.

Lint errors

2 participants