Skip to content

Add a Makefile for convenience - #8491

Draft
jbampton wants to merge 6 commits into
apache:mainfrom
jbampton:add-makefile-for-convenience
Draft

Add a Makefile for convenience#8491
jbampton wants to merge 6 commits into
apache:mainfrom
jbampton:add-makefile-for-convenience

Conversation

@jbampton

@jbampton jbampton commented Jan 10, 2024

Copy link
Copy Markdown
Member

https://pre-commit.com/#4-optional-run-against-all-the-files

https://pre-commit.com/#3-install-the-git-hook-scripts

https://pre-commit.com/#pre-commit-autoupdate

Description

The Makefile will contain the three main commands for using pre-commit locally.

At least this gives you a quickstart and place to see and run the pre-commit commands.

Makefiles can be very handy perhaps in future more commands can be added.

https://en.wikipedia.org/wiki/Make_(software)

refs apache/sedona#1183

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecov Bot commented Jan 10, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.65%. Comparing base (659f675) to head (6168570).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8491   +/-   ##
=========================================
  Coverage     19.64%   19.65%           
- Complexity    19790    19792    +2     
=========================================
  Files          6368     6368           
  Lines        574889   574889           
  Branches      70353    70353           
=========================================
+ Hits         112962   112969    +7     
+ Misses       449656   449651    -5     
+ Partials      12271    12269    -2     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 20.92% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland

Copy link
Copy Markdown
Contributor

ah, you are from the makestory :D

@DaanHoogland

Copy link
Copy Markdown
Contributor

looks ok, I'm not sure of the use yet. can you explain the framework in use ; yarn, make. pre-commit? is this only for use in GHA?

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 - we've GitHub actions for this, and I don't expect people to run it manually on their systems.

@jbampton
jbampton marked this pull request as draft October 14, 2024 15:08
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland

Copy link
Copy Markdown
Contributor

-1 - we've GitHub actions for this, and I don't expect people to run it manually on their systems.

I actually would expect seasoned developers to run this depending on the kind of changes they are making. that is to say the checks. if we add them to the pom file somehow that could work as well.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@weizhouapache weizhouapache added this to the 4.24.0 milestone Jun 29, 2026
@nvazquez

Copy link
Copy Markdown
Contributor

Hi @jbampton is this PR ready for review or is it still in progress?

Copilot AI lite review requested due to automatic review settings August 13, 2026 02:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a repository-root Makefile to provide a simple local developer entrypoint for common pre-commit workflows, complementing the existing pre-commit documentation and CI workflow.

Changes:

  • Introduces make check to run pre-commit against all files.
  • Adds make checkinstall to install the git hook scripts.
  • Adds make checkupdate to autoupdate pre-commit hook revisions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jbampton
jbampton marked this pull request as ready for review August 13, 2026 03:29
@jbampton

Copy link
Copy Markdown
Member Author

Hi @jbampton is this PR ready for review or is it still in progress?

Hey @nvazquez yes this PR is now ready for review

@nvazquez

nvazquez commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Thanks @jbampton

Hi @yadvr @DaanHoogland can you please have a second review on this PR?

@DaanHoogland

Copy link
Copy Markdown
Contributor

Thanks @jbampton

Hi @yadvr @DaanHoogland can you please have a second review on this PR?

I feel that any make mechs since make are an abundance. We have choosen for maven and I’ll honour that, but providing a makefile by someone who wants it for someone who wants it should never be blocked. (in case not clear: a big plusone on this)

Comment thread Makefile
# under the License.

check :
pre-commit run --all-files

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally. CI runs pre-commit twice, the second with --hook-stage manual. This is only the first, so the chmod hook never runs locally. Should check run both, or should the manual one be its own target?

Comment thread Makefile
.PHONY : check

checkinstall :
pre-commit install

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkinstall only writes .git/hooks/pre-commit. The config sets default_stages: [pre-commit, pre-push], so the pre-push hook never gets installed. Worth adding --hook-type pre-commit --hook-type pre-push?

Comment thread Makefile
.PHONY : checkinstall

checkupdate :
pre-commit autoupdate

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this and it rewrote .pre-commit-config.yaml, bumping four pins (doctoc, oxipng, codespell, markdownlint). Exits 0 with no sign it touched a tracked file. Can we note that in a comment here?

Comment thread Makefile
# specific language governing permissions and limitations
# under the License.

check :

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare make runs check, since it is the first target. Works, but should we set .DEFAULT_GOAL and add a help target? The three names do not say much on their own.

@Damans227

Copy link
Copy Markdown
Collaborator

None of the targets check that pre-commit exists, so you just get "make: pre-commit: No such file or directory". Worth a guard?

@Damans227 Damans227 moved this from Ready to In progress in CloudStack Testing Sep 8, 2026
@Damans227 Damans227 moved this from In progress to Done in CloudStack Testing Sep 8, 2026
@Damans227 Damans227 moved this from Done to In review in CloudStack Testing Sep 8, 2026
@jbampton
jbampton marked this pull request as draft September 9, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

8 participants