Skip to content

Conversation

@kanake10
Copy link
Contributor

@kanake10 kanake10 commented Nov 5, 2025

Goal

Add a pre-push hook to automatically check and fix code formatting before pushing changes.

Implementation

Created a versioned pre-push hook script at hooks/pre-push directory.

Testing

NA

Checklist

  • I have signed the Stream CLA (required for external contributors)

this PR is open for editing by the way ie the hook file.
Optional: The hook can be extended to include linting, static analysis (Detekt) etc. If needed, I can add the same detekt check as this here.
To use the shared hooks directory, run:

git config core.hooksPath hooks

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

PR checklist ❌

The following issues were detected:

  • Missing required label: at least one label starting with pr:.

What we check

  1. Title is concise (5–18 words) unless labeled pr:ignore-for-release.
  2. At least one pr: label exists (e.g., pr:bug, pr:new-feature).
  3. Sections ### Goal, ### Implementation, and ### Testing contain content.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should commit git hooks if we're not enforcing them somehow and, for this specific case, I'd prefer not to force this behavior on contributors for the time being. It affects the developer experience when you want to push your changes to sync them and you don't yet care about formatting, as it increases the push time (waiting for spotless to run) and possibly fails the push.

It would also conflict with other hooks, since you can only have one script at a time (e.g. I have some global hooks that would be overridden).

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have this on Video SDK, not the best experience I agree, we would phasing it out on the other Android SDKs as well.

@aleksandar-apostolov
Copy link
Collaborator

We are phasing out on pre-commit hooks for formatting on all of our android SDKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants