Skip to content

Feature request: Commit formatted files automatically in a pre commit hook #22

@chgsit00

Description

@chgsit00

Is it possible to use ReGitLint in a way to auto-commit formatted file?
I'm currently using this in my pre-commit hook:
dotnet regitlint -f staged --format-only

But all it does when executing is commiting the unformated files. The format fixes are applied to the files, but then I have to save all modified files manually to make them appear as unstaged changes. Is there a way to format all files, save the changes, stage the changed made by ReGitLint and commit them using only one commit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions