Skip to content

Feature: Add local make self-validate target #372

@jwm4

Description

@jwm4

Problem

Currently, Makefile quality validation is only executable via GitHub Actions (.github/workflows/makefile-quality.yml). This makes it difficult for developers to:

  1. Run validation locally before pushing
  2. Test Makefile changes without creating a PR
  3. Debug validation failures that only show up in CI

As noted by @cgwalters in PR #367:

In projects I work on I try really hard to stick to a core principle that the GHA flows are "just" invoking things in a Justfile (or Makefile). It's ironic that this is about verifying a Makefile, but it's hard to execute outside of GHA.

Proposed Solution

Refactor the validation logic into a local make self-validate target that:

  1. Checks for required targets (currently done by GHA workflow)
  2. Validates phony declarations (currently done by GHA workflow)
  3. Checks target documentation (currently done by GHA workflow)
  4. Can be run locally before committing changes

The GHA workflow would then simply invoke:

make self-validate

Benefits

  • Faster feedback loop for developers
  • Consistent behavior between local and CI
  • Easier to debug validation failures
  • Follows best practice of "CI runs what developers can run"
  • Reduces GHA-specific logic

Current Workaround

Developers must push to a branch and wait for GHA to run, which slows down iteration.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions