Skip to content

Commit

Permalink
Add checkmake to lint Makefile (#1644)
Browse files Browse the repository at this point in the history
* Makefile linter v0

* Build

* cspell

* [MegaLinter] Apply linters fixes

* Build doc

Co-authored-by: nvuillam <[email protected]>
  • Loading branch information
nvuillam and nvuillam authored Jul 24, 2022
1 parent 4947895 commit 216f085
Show file tree
Hide file tree
Showing 127 changed files with 14,615 additions and 14,259 deletions.
5 changes: 5 additions & 0 deletions .automation/generated/linter-links-previews.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"image": "https://avatars3.githubusercontent.com/u/20517404?s=400&v=4",
"title": "martysweet/cfn-lint"
},
"checkmake": {
"description": "experimental linter/analyzer for Makefiles. Contribute to mrtazz/checkmake development by creating an account on GitHub.",
"image": "https://opengraph.githubassets.com/ef6a33ff4ba9b8f5c2285e94cbbbdd502ccb64f6c18462c0b9eae50d306bbc6e/mrtazz/checkmake",
"title": "GitHub - mrtazz/checkmake: experimental linter/analyzer for Makefiles"
},
"checkov": {
"description": "Prevent cloud misconfigurations during build-time for Terraform, Cloudformation, Kubernetes, Serverless framework and other infrastructure-as-code-languages with Checkov by Bridgecrew.",
"image": null,
Expand Down
42 changes: 21 additions & 21 deletions .automation/generated/megalinter-users.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"downloads_url": "https://api.github.com/repos/nektos/act/downloads",
"events_url": "https://api.github.com/repos/nektos/act/events",
"fork": false,
"forks": 692,
"forks_count": 692,
"forks": 691,
"forks_count": 691,
"forks_url": "https://api.github.com/repos/nektos/act/forks",
"full_name": "nektos/act",
"git_commits_url": "https://api.github.com/repos/nektos/act/git/commits{/sha}",
Expand Down Expand Up @@ -59,7 +59,7 @@
"milestones_url": "https://api.github.com/repos/nektos/act/milestones{/number}",
"mirror_url": null,
"name": "act",
"network_count": 692,
"network_count": 691,
"node_id": "MDEwOlJlcG9zaXRvcnkxNjM4ODMyNzk=",
"notifications_url": "https://api.github.com/repos/nektos/act/notifications{?since,all,participating}",
"open_issues": 80,
Expand Down Expand Up @@ -716,11 +716,11 @@
},
"private": false,
"pulls_url": "https://api.github.com/repos/oxsecurity/megalinter/pulls{/number}",
"pushed_at": "2022-07-24T09:40:38Z",
"pushed_at": "2022-07-24T10:51:58Z",
"releases_url": "https://api.github.com/repos/oxsecurity/megalinter/releases{/id}",
"size": 181677,
"size": 181973,
"ssh_url": "[email protected]:oxsecurity/megalinter.git",
"stargazers_count": 725,
"stargazers_count": 726,
"stargazers_url": "https://api.github.com/repos/oxsecurity/megalinter/stargazers",
"statuses_url": "https://api.github.com/repos/oxsecurity/megalinter/statuses/{sha}",
"subscribers_count": 7,
Expand Down Expand Up @@ -752,15 +752,15 @@
"terraform"
],
"trees_url": "https://api.github.com/repos/oxsecurity/megalinter/git/trees{/sha}",
"updated_at": "2022-07-22T12:44:37Z",
"updated_at": "2022-07-24T11:45:51Z",
"url": "https://api.github.com/repos/oxsecurity/megalinter",
"visibility": "public",
"watchers": 725,
"watchers_count": 725,
"watchers": 726,
"watchers_count": 726,
"web_commit_signoff_required": false
},
"repo_url": "https://github.com/oxsecurity/megalinter",
"stargazers": 725
"stargazers": 726
},
{
"info": {
Expand Down Expand Up @@ -824,8 +824,8 @@
"network_count": 92,
"node_id": "MDEwOlJlcG9zaXRvcnkyMzA5OTk4MjY=",
"notifications_url": "https://api.github.com/repos/onedr0p/home-ops/notifications{?since,all,participating}",
"open_issues": 5,
"open_issues_count": 5,
"open_issues": 4,
"open_issues_count": 4,
"owner": {
"avatar_url": "https://avatars.githubusercontent.com/u/213795?v=4",
"events_url": "https://api.github.com/users/onedr0p/events{/privacy}",
Expand All @@ -848,7 +848,7 @@
},
"private": false,
"pulls_url": "https://api.github.com/repos/onedr0p/home-ops/pulls{/number}",
"pushed_at": "2022-07-24T09:03:34Z",
"pushed_at": "2022-07-24T11:44:37Z",
"releases_url": "https://api.github.com/repos/onedr0p/home-ops/releases{/id}",
"size": 25468,
"ssh_url": "[email protected]:onedr0p/home-ops.git",
Expand Down Expand Up @@ -1308,8 +1308,8 @@
"downloads_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/downloads",
"events_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/events",
"fork": false,
"forks": 1090,
"forks_count": 1090,
"forks": 1092,
"forks_count": 1092,
"forks_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/forks",
"full_name": "KelvinTegelaar/CIPP",
"git_commits_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/git/commits{/sha}",
Expand Down Expand Up @@ -1344,7 +1344,7 @@
"milestones_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/milestones{/number}",
"mirror_url": null,
"name": "CIPP",
"network_count": 1090,
"network_count": 1092,
"node_id": "R_kgDOGNiHEA",
"notifications_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/notifications{?since,all,participating}",
"open_issues": 6,
Expand Down Expand Up @@ -4505,7 +4505,7 @@
"pulls_url": "https://api.github.com/repos/jr0dd/home-ops/pulls{/number}",
"pushed_at": "2022-07-24T10:05:10Z",
"releases_url": "https://api.github.com/repos/jr0dd/home-ops/releases{/id}",
"size": 5003,
"size": 5004,
"ssh_url": "[email protected]:jr0dd/home-ops.git",
"stargazers_count": 26,
"stargazers_url": "https://api.github.com/repos/jr0dd/home-ops/stargazers",
Expand Down Expand Up @@ -4863,7 +4863,7 @@
},
"private": false,
"pulls_url": "https://api.github.com/repos/0dragosh/homelab/pulls{/number}",
"pushed_at": "2022-07-22T17:32:23Z",
"pushed_at": "2022-07-24T10:49:51Z",
"releases_url": "https://api.github.com/repos/0dragosh/homelab/releases{/id}",
"size": 3550,
"ssh_url": "[email protected]:0dragosh/homelab.git",
Expand Down Expand Up @@ -6342,8 +6342,8 @@
"network_count": 0,
"node_id": "R_kgDOGJoJxw",
"notifications_url": "https://api.github.com/repos/ScribeMD/rootless-docker/notifications{?since,all,participating}",
"open_issues": 1,
"open_issues_count": 1,
"open_issues": 0,
"open_issues_count": 0,
"organization": {
"avatar_url": "https://avatars.githubusercontent.com/u/78177662?v=4",
"events_url": "https://api.github.com/users/ScribeMD/events{/privacy}",
Expand Down Expand Up @@ -6386,7 +6386,7 @@
},
"private": false,
"pulls_url": "https://api.github.com/repos/ScribeMD/rootless-docker/pulls{/number}",
"pushed_at": "2022-07-24T10:00:09Z",
"pushed_at": "2022-07-24T10:11:40Z",
"releases_url": "https://api.github.com/repos/ScribeMD/rootless-docker/releases{/id}",
"size": 109,
"ssh_url": "[email protected]:ScribeMD/rootless-docker.git",
Expand Down
23 changes: 23 additions & 0 deletions .automation/test/makefile/bad/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# this is a comment

expanded = "$(simple)"
simple := "foo"

clean:
rm bar
rm foo

foo: bar
touch foo

bar:
touch bar

all: foo

test:
@echo lolnah

.PHONY: clean

.DEFAULT_GOAL: all
23 changes: 23 additions & 0 deletions .automation/test/makefile/good/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# this is a comment

expanded = "$(simple)"
simple := "foo"

clean:
rm bar
rm foo

foo: bar
touch foo

bar:
touch bar

all: foo

test:
@echo lolnah

.PHONY: all clean test

.DEFAULT_GOAL: all
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"Braintree",
"Breporters",
"Bubley",
"CHECKMAKE",
"CHECKOV",
"CHECKSTYLE",
"CHKTEX",
Expand All @@ -64,6 +65,7 @@
"CSSFILE",
"CTAN",
"Callout",
"Checkmake",
"Checkstyle",
"Citealp",
"Citealt",
Expand Down Expand Up @@ -404,6 +406,7 @@
"cdxml",
"cfnlintrc",
"chardef",
"checkmake",
"checkmarx",
"checkov",
"checkstyle",
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ RUN wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf -
&& luarocks install luacheck


# checkmake installation
RUN ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \
&& wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \
&& chmod 755 /usr/local/bin/checkmake


# perlcritic installation
RUN curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic

Expand Down
Loading

0 comments on commit 216f085

Please sign in to comment.