-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c3481ad
Showing
9 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Lint | ||
on: | ||
push: | ||
pull_request: | ||
permissions: | ||
contents: read | ||
checks: write | ||
jobs: | ||
lint: | ||
name: Lint | ||
uses: ./.github/workflows/lint_reusable.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Lint | ||
on: workflow_call | ||
permissions: | ||
contents: read | ||
checks: write | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
# super-linter needs the full git history to get the | ||
# list of files that changed across commits | ||
fetch-depth: 0 | ||
- name: Load super-linter configuration | ||
# source | ||
# https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md#share-environment-variables-between-environments | ||
run: grep -v '^#' super-linter.env >> "$GITHUB_ENV" | ||
- name: Lint Code Base | ||
# must be in sync with version in compose file | ||
uses: super-linter/[email protected] | ||
env: | ||
# To report GitHub Actions status checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include .muggle/help.make | ||
.DELETE_ON_ERROR: | ||
|
||
.PHONY: all help lint | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
## Run all targets | ||
all: render | ||
|
||
## Lint code base | ||
lint: | ||
@echo "Linting ..." | ||
docker compose up super-linter | ||
@echo "... linting done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# from https://gist.github.com/klmr/575726c7e05d8780505a | ||
# Inspired by <http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html> | ||
# sed script explained: | ||
# /^##/: | ||
# * save line in hold space | ||
# * purge line | ||
# * Loop: | ||
# * append newline + line to hold space | ||
# * go to next line | ||
# * if line starts with doc comment, strip comment character off and loop | ||
# * remove target prerequisites | ||
# * append hold space (+ newline) to line | ||
# * replace newline plus comments by `---` | ||
# * print line | ||
# Separate expressions are necessary because labels cannot be delimited by | ||
# semicolon; see <http://stackoverflow.com/a/11799865/1968> | ||
.PHONY: help | ||
help: | ||
@echo "$$(tput bold)Available rules:$$(tput sgr0)" | ||
@echo | ||
@sed -n -e "/^## / { \ | ||
h; \ | ||
s/.*//; \ | ||
:doc" \ | ||
-e "H; \ | ||
n; \ | ||
s/^## //; \ | ||
t doc" \ | ||
-e "s/:.*//; \ | ||
G; \ | ||
s/\\n## /---/; \ | ||
s/\\n/ /g; \ | ||
p; \ | ||
}" ${MAKEFILE_LIST} \ | ||
| LC_ALL='C' sort --ignore-case \ | ||
| awk -F '---' \ | ||
-v ncol=$$(tput cols) \ | ||
-v indent=19 \ | ||
-v col_on="$$(tput setaf 6)" \ | ||
-v col_off="$$(tput sgr0)" \ | ||
'{ \ | ||
printf "%s%*s%s ", col_on, -indent, $$1, col_off; \ | ||
n = split($$2, words, " "); \ | ||
line_length = ncol - indent; \ | ||
for (i = 1; i <= n; i++) { \ | ||
line_length -= length(words[i]) + 1; \ | ||
if (line_length <= 0) { \ | ||
line_length = ncol - indent - length(words[i]) - 1; \ | ||
printf "\n%*s ", -indent, " "; \ | ||
} \ | ||
printf "%s ", words[i]; \ | ||
} \ | ||
printf "\n"; \ | ||
}' \ | ||
| more $(shell test $(shell uname) == Darwin && echo '--no-init --raw-control-chars') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2025 Max Held Social Data Products | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!make | ||
|
||
include .muggle/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# workflows | ||
|
||
Reusable GitHub Actions (GHA) Workflows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
services: | ||
super-linter: | ||
# version needs to be in sync with version in .github/*.yml | ||
image: ghcr.io/super-linter/super-linter:slim-v7.2.1 | ||
environment: | ||
- RUN_LOCAL=true | ||
# fix for amd64 bug as per https://github.com/super-linter/super-linter/issues/5070 | ||
- SHELL=/bin/bash | ||
platform: linux/amd64 | ||
env_file: | ||
- ./super-linter.env | ||
volumes: | ||
- .:/tmp/lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DEFAULT_BRANCH=main | ||
FILTER_REGEX_EXCLUDE='.*\.(pdf|PDF)$' | ||
IGNORE_GENERATED_FILES=true | ||
IGNORE_GITIGNORED_FILES=true | ||
LINTER_RULES_PATH=./ | ||
LOG_LEVEL=WARN | ||
VALIDATE_GIT_COMMITLINT=false | ||
VALIDATE_NATURAL_LANGUAGE=false |