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

Add support for an arbitrary clang_format command with arguments #124

Merged
merged 1 commit into from Jun 2, 2020

Conversation

@funous
Copy link
Contributor

funous commented Aug 6, 2019

Solves #123 by applying handling of clang_format_executable similar to the existing handling of google_java_executable

@googlebot googlebot added the cla: yes label Aug 6, 2019
Copy link
Member

malcolmr left a comment

Seems a bit messy, but it's consistent with what we're doing in googlejava.vim.

autoload/codefmt/clangformat.vim Outdated Show resolved Hide resolved
autoload/codefmt/clangformat.vim Outdated Show resolved Hide resolved
@malcolmr
Copy link
Member

malcolmr commented Aug 14, 2019

I've fixed the problem with Travis in #125 (sorry about that); could you rebase (and so trigger the CI test again) so that we can check that the tests still pass?

@agriffis
Copy link
Contributor

agriffis commented Feb 10, 2020

This is similar to what I needed in #136 to run npx prettier instead of prettier. The approach I took there was to support prettier_executable as a list in addition to a simple string, using a helper function for the boilerplate code.

We might want to consider the same approach here, so that we don't end up with bug reports later on because of splitting words without respect to shell quoting.

Assuming #136 goes through, I'll loop back to this PR with a diff for discussion.

To allow using more complex clang_format commands, such as executing
clang_format in a docker container, we use the more recent way of
parsing arguments using codefmt#formatterhelpers#ResolveFlagToArray.
@funous
Copy link
Contributor Author

funous commented May 31, 2020

I've updates this to use the new codefmt#formatterhelpers#ResolveFlagToArray to handle the arguments, introduced in #138. This makes the implementation cleaner.

Copy link
Contributor

dbarnett left a comment

LG, thanks for bearing with us on the details!

@dbarnett dbarnett merged commit e083709 into google:master Jun 2, 2020
1 check passed
1 check passed
cla/google All necessary CLAs are signed
@funous funous deleted the funous:clangformatcommand branch Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.