-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix some function names in comment #5986
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: piguagua <[email protected]>
WalkthroughThe pull request involves minor naming and comment updates across two files in the project. In Changes
Suggested Reviewers
Poem
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/catalog/config/template.go (1)
Line range hint
45-51
: LGTM! Consider enhancing the comment.The change from
isTemplate
toIsTemplate
is appropriate as it follows Go's naming convention for exported functions, which is necessary since it's used as a callback for the goflags package.Consider making the comment more descriptive:
-// IsTemplate is a callback function used by goflags to decide if given file should be read -// if it is not a nuclei-template file only then file is read +// IsTemplate is a callback function used by goflags to determine if a file is a valid +// nuclei template. It returns false for known config files and true for files with +// supported template extensions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/catalog/config/template.go
(1 hunks)pkg/core/executors.go
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- pkg/core/executors.go
🔇 Additional comments (1)
pkg/catalog/config/template.go (1)
Line range hint
40-51
: Verify all references are updated.Since both functions are exported and their names were changed, we should verify that all references have been updated accordingly.
Let's check for any missed references:
✅ Verification successful
All references are properly updated
The verification confirms that all code references are using the new function names
GetSupportTemplateFileExtensions
andIsTemplate
correctly, with no lingering references to the old names found in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to the old function names echo "Checking for old function name references..." rg "GetSupportedTemplateFileExtensions|isTemplate" --type go # Search for potential documentation that might need updates echo "Checking documentation files..." rg "GetSupportedTemplateFileExtensions|isTemplate" --type mdLength of output: 1259
Script:
#!/bin/bash # Search for references to the new function names echo "Checking new function name references..." rg "GetSupportTemplateFileExtensions|IsTemplate" --type go -A 2 # Search specifically in test files echo "Checking test files..." fd -e test.go --exec rg -l "GetSupportTemplateFileExtensions|IsTemplate" {}Length of output: 2186
Thanks for your contribution @piguagua ! :) |
It is my pleasure! |
Proposed changes
fix some function names in comment
Checklist
Summary by CodeRabbit
GetSupportedTemplateFileExtensions
toGetSupportTemplateFileExtensions
isTemplate
toIsTemplate
executeTemplateWithTarget
toexecuteTemplateWithTargets