Skip to content

added automated "make help" target to make makefile commands discoverable #4091

Merged
arkid15r merged 4 commits intoOWASP:mainfrom
anirudhprmar:feature/automate-make-help
Mar 7, 2026
Merged

added automated "make help" target to make makefile commands discoverable #4091
arkid15r merged 4 commits intoOWASP:mainfrom
anirudhprmar:feature/automate-make-help

Conversation

@anirudhprmar
Copy link
Contributor

@anirudhprmar anirudhprmar commented Feb 27, 2026

Proposed change

Resolves #4080

The problem was people were confused when it came to running make commands like :

  • not knowing which commands to use for which specific thing
  • "which command do I run?" questions were common
  • discoverability of commands was hidden within individual Makefiles

So to fix all this :

  • I used makefile's comments and conventions like ##, ##@ to add meaning to each command and categorized commands
  • And added a help target to the root makefile and made it default (meaning if user runs make the output will be make help)
  • added comments and conventions to individual makefiles too which were previously hidden (not discovered) now make command covers all the entire project's makefiles commands
  • I later updated the documentation, mentioning make help to see all the commands and their functions

How it works, now :
screenshot-2026-02-27_11-36-04

screenshot-2026-02-27_11-36-14

Checklist

  • Required: I followed the contributing workflow
  • Required: I verified that my code works as intended and resolves the issue as described
  • Required: I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

@github-actions github-actions bot added docs Improvements or additions to documentation backend frontend makefile labels Feb 27, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9eaef176-7579-40cb-a8a2-3d3a42fe12a2

📥 Commits

Reviewing files that changed from the base of the PR and between d7bea91 and 360286e.

📒 Files selected for processing (1)
  • CONTRIBUTING.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CONTRIBUTING.md

Summary by CodeRabbit

  • Documentation

    • Added Getting Started guidance showing how to list available development commands and view descriptive help for workflows.
    • Expanded help text describing build, run, test, security scanning, cleanup, and update procedures.
  • Chores

    • Introduced a help-first workflow with explicit, discoverable targets for build/run/test/security/cleanup/update.
    • Reorganized and documented backend, frontend, infrastructure, and spelling task groups for improved discoverability.

Walkthrough

Adds a repository-wide automated Makefile help/default goal and reorganizes Makefile targets (root, backend, frontend, cspell, infrastructure). Updates CONTRIBUTING.md with a Getting Started note referencing make help. Changes are documentation and Makefile target additions/reformatting only. No runtime code changes.

Changes

Cohort / File(s) Summary
Root Makefile & docs
Makefile, CONTRIBUTING.md
Set .DEFAULT_GOAL := help; add help target; introduce categorized public targets (build, run, check, test, security-scan, clean, prune, update, etc.). Added Getting Started subsection referencing make help in CONTRIBUTING.md.
Backend Makefile
backend/Makefile
Added Backend header and many targets for data, shell, migrations, indexing and tests (e.g., create-superuser, django-shell, dump-data, enrich-data, index-data, load-data, migrate, migrations, purge-data, shell-backend, shell-db, test-backend, test-fuzz). Expanded enrich-data dependencies.
Frontend Makefile
frontend/Makefile
Added Frontend header; changed build-frontend-local-image to use --no-cache, explicit Dockerfile and tag; added check-frontend, test-frontend group and test-frontend-e2e target (e2e via Docker/compose).
Spelling / cspell Makefile
cspell/Makefile
Inserted "Spelling" section header and inline description for check-spelling target (formatting/documentation only).
Infrastructure Makefile
infrastructure/Makefile
Added "Infrastructure" header and annotated test-infrastructure target with an inline description (no recipe change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • kasya
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding an automated 'make help' target to improve Makefile command discoverability.
Description check ✅ Passed The description clearly explains the problem, solution, and implementation details, with supporting screenshots demonstrating the working help output.
Linked Issues check ✅ Passed The PR fully addresses all coding requirements from issue #4080: implemented automated help target using Makefile conventions (##, ##@), added help as default goal, organized commands by use case, and documented the approach.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the automated 'make help' feature: Makefile modifications, documentation updates, and target annotations align with the linked issue objectives.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
cubic-dev-ai[bot]
cubic-dev-ai bot previously approved these changes Feb 27, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@arkid15r arkid15r enabled auto-merge March 7, 2026 19:19
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we can improve grouping and some targets visibility (not all needed for contributors).

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.71%. Comparing base (ceca40b) to head (360286e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4091   +/-   ##
=======================================
  Coverage   99.71%   99.71%           
=======================================
  Files         519      519           
  Lines       16068    16068           
  Branches     2192     2192           
=======================================
  Hits        16022    16022           
  Misses         38       38           
  Partials        8        8           
Flag Coverage Δ
backend 99.70% <ø> (ø)
frontend 99.72% <ø> (ø)

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


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ceca40b...360286e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arkid15r arkid15r added this pull request to the merge queue Mar 7, 2026
Merged via the queue into OWASP:main with commit c35d7d6 Mar 7, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend docs Improvements or additions to documentation frontend makefile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add automated 'make help' target for better Makefile command discoverability

2 participants