Checkmake: Experimental Linter/Analyzer for Makefiles

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • checkmake

    experimental linter/analyzer for Makefiles

  • Unfortunately Checkmake only has 4 rules[0]. It's not a very useful tool unless you're wanting a tool that complains that you don't have an 'all' and 'test' target, or that your target is longer than 5 lines[1].

    [0]: https://github.com/mrtazz/checkmake/tree/main/rules

    [1]: https://github.com/mrtazz/checkmake/blob/main/rules/maxbodyl...

  • make-audit

    Easy-to-use tool for auditing Makefiles for errors

  • Cool!

    I also have an experimental (GNU) makefile auditor called "make-audit", available here: https://github.com/david-a-wheeler/make-audit

    Per its README: "It will report when an execution of make reads or changes files in ways that are inconsistent with its Makefile. It requires an "auditor" tool named pmaudit in your PATH. It also requires GNU make to be installed and run as make."

    Sadly, make-audit is also rather experimental. As I say in its README, "This is an extremely early version. Much needs fixing." For example:

    * This doesn't properly handle grouped targets or empty commands. It should handle makefiles with their own SHELL and .ONESHELL values.

    * I don't think it handles multi-line make commands exactly correctly (it's close but not quite right).

    * Lots more options are needed.

    * It needs a better internal test suite.

    Still, make-audit does do some useful things, and it'd be awesome if others would be willing to work with me to make it reliably useful.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ShellCheck

    ShellCheck, a static analysis tool for shell scripts

  • Some discussion on that here:

    https://github.com/koalaman/shellcheck/issues/58

    The hadolint project does shell checking for Dockerfiles and it uses shellcheck:

    https://github.com/hadolint/hadolint

    So the approach is definitely feasible, but you do need a new project and probably it needs to be written in Haskell.

  • hadolint

    Dockerfile linter, validate inline bash, written in Haskell

  • Some discussion on that here:

    https://github.com/koalaman/shellcheck/issues/58

    The hadolint project does shell checking for Dockerfiles and it uses shellcheck:

    https://github.com/hadolint/hadolint

    So the approach is definitely feasible, but you do need a new project and probably it needs to be written in Haskell.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Flymake just works with ruff

    2 projects | /r/emacs | 10 Feb 2023
  • Announcing zsh-sweep, a zsh-linter

    2 projects | /r/commandline | 28 Jan 2023
  • Dockerfile Linter

    1 project | news.ycombinator.com | 3 Mar 2024
  • Ask HN: Popular open source tool originally written in Haskell?

    3 projects | news.ycombinator.com | 10 Feb 2024
  • Ask HN: A Bash guide for Posix programmers?

    1 project | news.ycombinator.com | 17 Dec 2023