wasm-c-api
wasm-c-api copied to clipboard
Use clang-format to format API code
This would make it much easier for collaborators to ensure their changes have formatting that is consistent with the rest of the repo.
I'm locally using a .clang-format
that just contains BasedOnStyle: Chromium
, which is reasonably close to the existing code, but not perfect. Ideally @rossberg could add a .clang-format
based on his preferences, and apply it to the existing code.
Yeah, I understand the suggestion, but I'm sorry to say that my prior exposure has elicited an allergy to clang-format. Symptoms are cringing pain and curling toe nails when exposed to algorithmic stupor steam-rolling over aesthetics. :)
Is the amount of code contributions to expect for this repo large enough that formatting would likely be a problem?
Yeah, I understand the suggestion, but I'm sorry to say that my prior exposure has elicited an allergy to clang-format. Symptoms are cringing pain and curling toe nails when exposed to algorithmic stupor steam-rolling over aesthetics. :)
I understand your feeling, and after using clang-format for a while on WAVM, am still disappointed with the way it formats certain things. But it's also liberating to accept the automatic formatting and focus on more important issues.
Is the amount of code contributions to expect for this repo large enough that formatting would likely be a problem?
I don't know, but this repo will need to continue to evolve with WebAssembly.
I understand your feeling, and after using clang-format for a while on WAVM, am still disappointed with the way it formats certain things. But it's also liberating to accept the automatic formatting and focus on more important issues.
Big +1 to this.
Is the amount of code contributions to expect for this repo large enough that formatting would likely be a problem?
For me this is the only thing that matters; making collaboration easier is much more important than any one person's sense of aesthetics. Obviously, whether formatting is a "problem" could also be subjective; but the cost is small, and adding formatting early is easier than doing it later (e.g. in response to disagreement) when there's a lot of existing code.
Could you upload a PR with the changes that result for formatting with BasedOnStyle: Chromium
so we can see how intrusive it would be?
Could you upload a PR with the changes that result for formatting with BasedOnStyle: Chromium so we can see how intrusive it would be?
@sbc100 See #115.