This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 02903cb4fd [CI] Add pre-commit hook checkmake to lint Makefiles (#2751)
02903cb4fd is described below
commit 02903cb4fd67d7e19d428232604e5745333ad8fe
Author: John Bampton <[email protected]>
AuthorDate: Mon Mar 16 15:03:52 2026 +1000
[CI] Add pre-commit hook checkmake to lint Makefiles (#2751)
---
.pre-commit-config.yaml | 23 +++++++++++++++++++++++
Makefile | 2 +-
checkmake.ini | 22 ++++++++++++++++++++++
python/sedona/doc/checkmake.ini | 22 ++++++++++++++++++++++
4 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 657a0e9c1c..162efd4d3b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -117,6 +117,16 @@ repos:
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
+ - id: insert-license
+ name: add license for all ini files
+ description: automatically adds a licence header to all ini files that
don't have a license header
+ files: \.ini$
+ args:
+ - --comment-style
+ - '|;|'
+ - --license-filepath
+ - .github/workflows/license-templates/LICENSE.txt
+ - --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Java files
description: automatically adds a licence header to all Java files
that don't have a license header
@@ -525,3 +535,16 @@ repos:
- 'SC2102'
- -ignore
- 'SC2155'
+ - repo: https://github.com/checkmake/checkmake.git
+ rev: v0.3.2
+ hooks:
+ - id: checkmake
+ name: run checkmake (root)
+ description: checkmake is a linter for Makefiles
+ files: ^Makefile$
+ args: ['--config=checkmake.ini']
+ - id: checkmake
+ name: run checkmake (python/sedona/doc)
+ description: checkmake is a linter for Makefiles
+ files: ^python/sedona/doc/Makefile$
+ args: ['--config=python/sedona/doc/checkmake.ini']
diff --git a/Makefile b/Makefile
index 972e17d748..216c0af42c 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
PYTHON := $(shell command -v python || command -v python3 || echo python)
PIP := $(PYTHON) -m pip
-.PHONY: check checkinstall checkupdate install docsinstall docsbuild clean test
+.PHONY: check checkinstall checkupdate install docsinstall docsbuild clean
run-docs
check:
@echo "Running pre-commit checks..."
diff --git a/checkmake.ini b/checkmake.ini
new file mode 100644
index 0000000000..69fb487d50
--- /dev/null
+++ b/checkmake.ini
@@ -0,0 +1,22 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+
+[maxbodylength]
+maxBodyLength = 10
+
+[minphony]
+required =
check,checkinstall,checkupdate,install,docsinstall,docsbuild,clean,run-docs
diff --git a/python/sedona/doc/checkmake.ini b/python/sedona/doc/checkmake.ini
new file mode 100644
index 0000000000..15ad173ccd
--- /dev/null
+++ b/python/sedona/doc/checkmake.ini
@@ -0,0 +1,22 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+
+[maxbodylength]
+maxBodyLength = 2
+
+[minphony]
+required = help,livehtml