Skip to content
Tomo Suzuki edited this page Aug 4, 2020 · 7 revisions

Code Formatting

google-java-format-diff.py helps to identify any code formatting gap between current HEAD and origin/master in Git.

To run formatting in-place (-i):

~/cloud-opensource-java$ git fetch; git diff -U0 origin/master...HEAD | google-java-format-diff.py -p1 --skip-sorting-imports -i

Jekyll for GitHub Pages

https://jlbp.dev is running on GitHub Pages. Jekyll converts the markdown documents to the web site in your machine. Here are the steps to use Jekyll.

Install Jekyll.

$ cd cloud-opensource-java/docs
$ sudo apt-get install ruby-dev
$ sudo gem install bundler
$ bundle install --path vendor/bundle

Run Jekyll to serve GitHub pages locally.

# In docs directory
$ bundle exec jekyll serve
...
 Server address: http://127.0.0.1:4000

Then access http://localhost:4000 to see the page:

Jekyll serving GitHub Pages

Integration Test for the Enforcer Rule

Maven invoker plugin takes an option to specify the directory of the test.

mvn clean install -Dmaven.test.skip -Dinvoker.test=fail-build-for-linkage-errors