Skip to content

Adds basic pre-commit#260

Merged
folbricht merged 1 commit intofolbricht:masterfrom
bearrito:feature/pre-commit
Mar 10, 2024
Merged

Adds basic pre-commit#260
folbricht merged 1 commit intofolbricht:masterfrom
bearrito:feature/pre-commit

Conversation

@bearrito
Copy link
Copy Markdown
Contributor

@bearrito bearrito commented Mar 6, 2024

I continually forget to do things before commit, in most projects I rely on pre-commit (maybe to my detriment).

This adds a basic pre-commit script. https://pre-commit.com/
This is completely opt in. If a user doesn't use pre-commit. Then nothing happens locally or in ci.

I only selected the least opinionated of all available hooks. I left the opinionated hooks in, if those are something you'd want for the project.

The unit test hook is currently commented out because of a failing cmd unit-test. It should be re-enabled.

bearrito@home:~/Git/desync/cmd/desync$ pre-commit run
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/bstrausser/.cache/pre-commit/patch1709692795-3024168.
[WARNING] The 'rev' field of repo 'https://github.com/dnephin/pre-commit-golang' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.  Hint: `pre-commit autoupdate` often fixes this.
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for added large files..............................................Passed
go fmt...................................................................Passed
go-build.................................................................Passed
go-mod-tidy..............................................................Passed

@bearrito
Copy link
Copy Markdown
Contributor Author

bearrito commented Mar 6, 2024

I don't believe anything in this commit should be making the build fail, nor the windows build specifically.

@folbricht folbricht merged commit bfeeb2f into folbricht:master Mar 10, 2024
JeremieA pushed a commit to InSimo/desync that referenced this pull request Apr 10, 2026
Co-authored-by: bstrausser <bstrausser@locusrobotics.com>
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.

2 participants