Skip to content

Add linting to build process and TAP to test process #8

Closed

Description

@wesley-dean

Add a target, check, to the Makefile that will use gawk to lint using the --lint flag:

## Run GNU awk lint against maintained root AWK sources.
check:
	@command -v gawk >/dev/null 2>&1 || { printf '%s\n' 'gawk is required for make check' >&2; exit 1; }
	@for source in $(AWK_SOURCES); do \
		printf '%s\n' "Linting $$source"; \
		gawk --lint=fatal -f "$$source" </dev/null >/dev/null; \
	done

When developing this tool, be sure to run make check to verify that code correctness.

The test target should not include linting. However, the output for test should be TAP-compliant. If it's not already formatted for TAP, please adjust the output for test to produce TAP.

Then, change the GitHub Action .github/workflows/semver.yml step that builds and validates the release artifact to include check:

      - name: Validate maintained source
        run: make check test-source

Note: these code sections were from a separate project's release action; they may not be byte-for-byte for what's in this repository.

Activity

  1. changed the title [-]Lint AWK files[/-] [+]Add linting to build process and TAP to test process[/+] on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions