You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently qmk cformat without any additional arguments runs clang-format against everything. To make it easier and faster to use we should support detecting changes and run only against those files which have been edited.
Feature Request Type
Core functionality
Alteration (enhancement/optimization) of existing feature(s)
Description
When the user supplies a list of filenames (by running qmk cformat <file1> <file2> <...> <fileN>) the behavior should be unchanged.
When the user runs qmk cformat -a the command should behave exactly as running qmk cformat does today, by running clang-format against all core files.
When the user runs qmk cformat without any arguments we should use the output of git diff --name-only origin/master <core directories> to find the files to format. We should provide a new optional option --base-branch (-b) to specify a branch other than origin/master.
The text was updated successfully, but these errors were encountered:
The behavior is still a WIP. I've written these down as a starting point but if there's an argument for doing it differently please suggest changes. For example, I'm not entirely fond of the name --master-branch but I'm wary of the implications of having user.branch overriding behavior here.
I'd suggest --base-branch instead of --master-branch, because base branch is GitHub's term for the target of a pull request. The default branch of a repo isn't always going to be named master. -b alias still works IMO though.
Currently
qmk cformat
without any additional arguments runs clang-format against everything. To make it easier and faster to use we should support detecting changes and run only against those files which have been edited.Feature Request Type
Description
When the user supplies a list of filenames (by running
qmk cformat <file1> <file2> <...> <fileN>
) the behavior should be unchanged.When the user runs
qmk cformat -a
the command should behave exactly as runningqmk cformat
does today, by runningclang-format
against all core files.When the user runs
qmk cformat
without any arguments we should use the output ofgit diff --name-only origin/master <core directories>
to find the files to format. We should provide a new optional option--base-branch
(-b
) to specify a branch other thanorigin/master
.The text was updated successfully, but these errors were encountered: