Skip to content

stekolla/sps-clang-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Setting up clang-format in the Google Cloud Shell Console

This will walk you through setting up clang-format for use in the Google Cloud Shell Console.

From the Google Cloud Shell Console, clone this repo to your local space:

git clone https://github.com/stekolla/sps-clang-format ~/sps-clang-format

Now, you just need to copy a couple files from this repo to the root of your local space and run some initial setup on them:

cp ~/sps-clang-format/.customize_environment ~/.customize_environment
bash ~/.customize_environment

cp ~/sps-clang-format/.bash_aliases ~/.bash_aliases
source ~/.bash_aliases

And that's it!

Running clang-format

To make it easy to run clang-format on your JS and Java files, a new bash function named clang-format-path has been added, which takes as an argument the relative path that contains the files you want to format.

As an example, if you're already in the ~/software-product-sprint/portfolio directory and wanted to format all of the files in that directory and its sub-directories, you could do:

clang-format-path .

If you're already in the ~/software-product-sprint/portfolio directory and only want to format the files in the src/main/java/com/google/spsp/servlets directory, you could do:

clang-format-path src/main/java/com/google/spsp/servlets

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages