-
Notifications
You must be signed in to change notification settings - Fork 102
Add yapf and clang-format to formatter #177
Comments
I would want to try out this one. |
Ok, go ahead :) |
@NikleshPhabiani for reference, you can have a look at how |
@vmax . Actually, I did happen to look at how |
A snippet for installation of clang-format on macOS: platform=$(uname)
if [ "$platform" == "Darwin" ]; then
mkdir -p ./clang-format
curl 'http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz' -o './clang-format/clang-format.tar.xz'
tar xvfj clang-format/clang-format.tar.xz -C ./clang-format
rm -f ~/bin/clang-format
ln -s $(pwd)/$(find clang-format | grep bin/clang-format$) ~/bin/clang-format
fi Is this fine or is something else expected? The other relevant files will be changed but this is just a snippet for installation on the system. Also, which binary from the releases needs to be used for installation on Linux? Thanks. |
So the idea is to have bazel get the binary. That way no setup step is needed from the developer. Ohh, and when we say linux, we actually mean Ubuntu :) so "Clang for Ubuntu 16.04". |
Hey, how's it going? |
Hey. Sorry, couldn't work on this during the week. I will get this done early in the weekend. Oh ok, got it. Thanks a lot. One doubt. What would be the SHA-256 code for these? I couldn't figure out a way yet to retrieve a tag for each. |
That's fine, just checking. |
@NikleshPhabiani One more SHA-256 tip: if you don't specify it, |
Thanks a lot for all the help. I have a doubt regarding YAPF. The release does not have separate versions for Linux and macOS. Is it platform independent and linked directly to Python? Kindly let me know what needs to be done with respect to YAPF. |
@NikleshPhabiani it'll be great to use it as |
|
Actually, I am extremely tied up for sometime with university coursework and interviews. Hence, won't be able to pick this up atleast for a couple of days. |
That's fine. I created an issue just for yapf #304 More details about P3 and other priorities: https://developers.google.com/issue-tracker/concepts/issues |
//tools:formatter
currently relies onyapf
andclang-format
being available on the user's system.We should make a BUILD target that will make
bazel
download them, and then add them toruntime_deps
of//tools:formatter
, so that they're available to the tool to use.The text was updated successfully, but these errors were encountered: