Skip to content

chore: fix some function names in comment#6756

Merged
Mzack9999 merged 1 commit intoprojectdiscovery:devfrom
promalert:dev
Jan 7, 2026
Merged

chore: fix some function names in comment#6756
Mzack9999 merged 1 commit intoprojectdiscovery:devfrom
promalert:dev

Conversation

@promalert
Copy link
Contributor

@promalert promalert commented Jan 7, 2026

Proposed changes

fix some function names in comment

Proof

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

Release Notes

  • Refactor
    • Internal code improvements and updates to maintain code quality.

Note: This release contains no user-facing changes.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: promalert <promalert@outlook.com>
@auto-assign auto-assign bot requested a review from Mzack9999 January 7, 2026 06:09
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Refactoring updates across two protocol handler files: a comment adjustment in the headless request handler and a method/parameter rename in the HTTP request handler for improved nomenclature. No functional logic changes introduced.

Changes

Cohort / File(s) Summary
Comment Update
pkg/protocols/headless/request.go
Updated preceding comment to reference function name getLastNavigationURLWithLog; implementation unchanged
Method and Parameter Rename
pkg/protocols/http/request.go
Renamed method executeRaceRequestexecuteParallelHTTP; renamed parameter previousdynamicValues (type output.InternalEvent unchanged); updated associated comment

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop and a rename, clarity calls,
Old names take leave, new ones enthrall,
From race to parallel, the flow runs true,
These little tweaks make the code anew!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims to fix function names in comments, but the changes include a public method rename from executeRaceRequest to executeParallelHTTP and a parameter rename, which are substantive code changes beyond comment fixes. Update the title to accurately reflect the main changes, such as 'refactor: rename executeRaceRequest to executeParallelHTTP and update related parameters' to clearly communicate the scope of functional changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom Pre-merge Checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 286fc91 and 221dfce.

📒 Files selected for processing (2)
  • pkg/protocols/headless/request.go
  • pkg/protocols/http/request.go
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • pkg/protocols/headless/request.go
  • pkg/protocols/http/request.go
pkg/protocols/**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

pkg/protocols/**/*.go: Each protocol implementation should implement the Request interface with Compile(), ExecuteWithResults(), Match(), and Extract() methods
Protocol implementations should embed Operators for matching/extraction functionality

Files:

  • pkg/protocols/headless/request.go
  • pkg/protocols/http/request.go
🔇 Additional comments (2)
pkg/protocols/headless/request.go (1)

278-278: LGTM! Comment now accurately reflects the function name.

The comment has been updated to match the actual function name getLastNavigationURLWithLog, improving code documentation.

pkg/protocols/http/request.go (1)

193-194: Parameter naming is consistent; execution paths use different signatures by design.

The parameter rename to dynamicValues is used correctly throughout the executeParallelHTTP code path:

  • dynamicValues is properly passed to generator.Make() at line 323
  • The empty map passed to executeRequest() at line 275 is intentional—parallel execution generates independent requests without a prior sequential event context

The apparent inconsistency with executeTurboHTTP is by design: these are three separate execution paths (serial, parallel, and turbo), not sequential stages. executeTurboHTTP retains both parameters because it implements pipelined execution with stateful request chaining, whereas executeParallelHTTP spawns independent workers and has no "previous" event to propagate. The function signatures correctly reflect their respective execution semantics.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Mzack9999
Copy link
Member

@coderabbitai create a maintenance/chore issue for this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create a maintenance/chore issue for PR #6756

gh issue create \
  --title "Chore: Fix function names in comments" \
  --body "This issue tracks the maintenance work related to fixing function names in comments across the codebase.

**Related PR:** https://github.com/projectdiscovery/nuclei/pull/6756

**Changes needed:**
- Update comments to reflect correct function names in \`pkg/protocols/headless/request.go\`
- Rename function from \`executeRaceRequest\` to \`executeParallelHTTP\` in \`pkg/protocols/http/request.go\`
- Update parameter naming for consistency

**Requested by:** @Mzack9999" \
  --assignee Mzack9999

Length of output: 54


@Mzack9999: I've created a maintenance/chore issue for this PR: #6757

The issue has been assigned to you and includes the details about fixing function names in comments with a backlink to this PR.

@Mzack9999 Mzack9999 linked an issue Jan 7, 2026 that may be closed by this pull request
@Mzack9999 Mzack9999 added the Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity. label Jan 7, 2026
@Mzack9999 Mzack9999 merged commit aa16e5e into projectdiscovery:dev Jan 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore: Fix function names in comments

2 participants