You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tooling.apache.org by "jbampton (via GitHub)" <gi...@apache.org> on 2026/03/14 18:11:13 UTC

[I] pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules. (tooling-trusted-releases)

jbampton opened a new issue, #886:
URL: https://github.com/apache/tooling-trusted-releases/issues/886

   https://github.com/checkmake/checkmake
   
   https://github.com/checkmake/checkmake?tab=readme-ov-file#pre-commit-usage
   
   I have an open PR on Apache Sedona where I added checkmate with pre-commit so I won't repeat all the details
   
   refs https://github.com/apache/sedona/pull/2751
   
   A minor improvement.  
   
   Just thought I would mention checkmake since I only learned about it a few days ago.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org


Re: [I] pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules. (tooling-trusted-releases)

Posted by "dave2wave (via GitHub)" <gi...@apache.org>.
dave2wave commented on issue #886:
URL: https://github.com/apache/tooling-trusted-releases/issues/886#issuecomment-4500855548

   Not necessary since we rarely change `Makefile` and when we do we ought to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org


Re: [I] pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules. (tooling-trusted-releases)

Posted by "asf-tooling (via GitHub)" <gi...@apache.org>.
asf-tooling commented on issue #886:
URL: https://github.com/apache/tooling-trusted-releases/issues/886#issuecomment-4410072573

   <!-- gofannon-issue-triage-bot v2 -->
   
   **Automated triage** — analyzed at `main@2da7807a`
   
   **Type:** `new_feature`  •  **Classification:** `actionable`  •  **Confidence:** `high`
   **Application domain(s):** `shared_infrastructure`
   
   ### Summary
   Issue proposes adding checkmake (a Makefile linter) as a pre-commit hook. The repository has a substantial Makefile with many targets and already uses numerous pre-commit hooks for various file types but has no Makefile-specific linting. This is a straightforward, low-risk addition to the pre-commit configuration. No prior discussion exists on the issue.
   
   ### Where new code would go
   - `.pre-commit-config.yaml` — after shellcheck-py hook (line 57)
     checkmake is a lightweight linter for build infrastructure files, logically grouped with shellcheck which lints shell scripts.
   
   ### Proposed approach
   Add checkmake as a pre-commit hook in `.pre-commit-config.yaml`, positioned after the shellcheck hook. The hook should target only the root Makefile (using `files: (^|/)Makefile$` to be safe). checkmake is a Go binary distributed via its own repo hook, so no additional Python dependencies are needed.
   
   A `.checkmake.ini` configuration file may be needed if checkmake flags any rules that are intentionally violated in this project's Makefile (e.g., if the project uses certain patterns that checkmake considers non-idiomatic). The initial addition should use default rules and any necessary exclusions can be added after seeing what gets flagged.
   
   ### Suggested patches
   
   #### `.pre-commit-config.yaml`
   Add checkmake hook after shellcheck to lint Makefiles
   
   ````diff
   --- a/.pre-commit-config.yaml
   +++ b/.pre-commit-config.yaml
   @@ -54,6 +54,10 @@
    - repo: https://github.com/shellcheck-py/shellcheck-py
      rev: v0.11.0.1
      hooks:
        - id: shellcheck
   +- repo: https://github.com/checkmake/checkmake
   +  rev: 0.2.2  # TODO: confirm latest release tag
   +  hooks:
   +    - id: checkmake
    - repo: https://github.com/rtts/djhtml
      rev: 3.0.11
      hooks:
   ````
   
   ### Open questions
   - What is the latest stable release tag for checkmake? The issue references the repo but the rev '0.2.2' should be confirmed.
   - Does checkmake flag any false positives on the current Makefile that would require a .checkmake.ini configuration file to suppress?
   - Should a .checkmake.ini be added proactively to configure rules, or should defaults be used first and adjusted as needed?
   
   ### Files examined
   - `.pre-commit-config.yaml`
   - `.pre-commit-heavy.yaml`
   - `.pre-commit-light.yaml`
   - `Makefile`
   - `.github/workflows/analyze.yml`
   - `pyproject.toml`
   - `DEVELOPMENT.md`
   
   ---
   *Draft from a triage agent. A human reviewer should validate before merging any change. The agent did not run tests or verify diffs apply.*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org


Re: [I] pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules. (tooling-trusted-releases)

Posted by "dave2wave (via GitHub)" <gi...@apache.org>.
dave2wave closed issue #886: pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules.
URL: https://github.com/apache/tooling-trusted-releases/issues/886


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org


Re: [I] pre-commit: we can add `checkmake` a linter for Makefiles. It scans Makefiles for potential issues based on configurable rules. (tooling-trusted-releases)

Posted by "dave2wave (via GitHub)" <gi...@apache.org>.
dave2wave commented on issue #886:
URL: https://github.com/apache/tooling-trusted-releases/issues/886#issuecomment-4500858141

   But thanks for the suggestion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org