build(make): update template-validate cmds#6385
Conversation
Signed-off-by: Dwi Siswanto <git@dw1.io>
WalkthroughUpdated Makefile target template-validate: replaced single-line nuclei validate invocations with multi-line forms, added exclusions for .github/, helpers/payloads/, and -ept code, kept -ut unchanged, and retained second call with -w workflows. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai create an issue and linking to this PR. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll examine the PR changes first to create a meaningful issue for you. 🏁 Script executed: Length of output: 1729 Now I'll create a follow-up issue related to this PR's template validation improvements: 🏁 Script executed: Length of output: 1146 @dwisiswant0 I've created issue #6386 to track follow-up work related to your template validation improvements in this PR. The issue focuses on:
You can view the issue here: #6386 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
Makefile (3)
149-159: DRY the repeated validate flags via a make variableThe two invocations repeat the same exclude flags. Factor them into a single variable to reduce duplication and ease future maintenance.
Apply this diff within the target:
./bin/nuclei -validate \ - -et .github/ \ - -et helpers/payloads/ \ - -et http/technologies \ - -ept code + $(NUC_VALIDATE_EXCLUDES) ./bin/nuclei -validate \ -w workflows \ - -et .github/ \ - -et helpers/payloads/ \ - -et http/technologies \ - -ept code + $(NUC_VALIDATE_EXCLUDES)Add this variable definition once (suggest near other top-level vars):
# Common excludes for nuclei template validation NUC_VALIDATE_EXCLUDES := -et .github -et helpers/payloads -et http/technologies -ept code
151-158: Normalize trailing slashes in -et pathsYou mix trailing slashes on .github/ and helpers/payloads/ but omit it on http/technologies. Normalize to one style to avoid edge-case mismatches and improve readability. Suggest dropping trailing slashes across the board.
- -et .github/ \ - -et helpers/payloads/ \ + -et .github \ + -et helpers/payloads \ -et http/technologies \And the same normalization in the second invocation.
149-159: Optional: add a brief comment explaining the exclusionsFuture contributors may not immediately know why .github, helpers/payloads, http/technologies, or code protocol are excluded. A short comment preserves intent.
template-validate: build template-validate: ./bin/nuclei -ut + # Exclude GitHub metadata, payload helpers, technology definitions, and code protocol from template validation ./bin/nuclei -validate \
Proposed changes
Checklist
Summary by CodeRabbit