Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clang-format for .c and .h files #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jacobvosmaer
Copy link

Because clang-format is not used universally, this change adds a check so that we only run clang-format if a .clang-format file can be found higher up in the directory tree.

This is an alternative approach to #111. I find it gets tedious to define a filter for each file I open.

Because clang-format is not used universally, this change adds a check
so that we only run clang-format if a .clang-format file can be found
higher up in the directory tree.
@@ -21,7 +21,6 @@
// The other known extensions and formatters are:
//
// .rs - rustfmt
//
Copy link
Author

Choose a reason for hiding this comment

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

This line got deleted, ironically, by acmego. I need to add a comment about .c and .h here.

".go": []string{"goimports"},
type formatter struct {
cmd []string
enabled func(string) bool
Copy link
Author

Choose a reason for hiding this comment

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

I suppose we could have a method Enabled() which returns true if this callback field is nil.

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.

1 participant