GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zennken/google-java-format: Reformats Java source code to comply with Google Java Style.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

863 Commits
863 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.mvn
.mvn
 
 
core
core
 
 
eclipse_plugin
eclipse_plugin
 
 
idea_plugin
idea_plugin
 
 
scripts
scripts
 
 
util
util
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

google-java-format

google-java-format is a program that reformats Java source code to comply with Google Java Style.

Customization

This repository is a fork of google/google-java-format and includes several customizations made for personal purposes.

Changes to maintain backward compatibility

  • Indentation: 2 → 4 spaces
  • Maximum line length: 100 → 120 characters

New feature

  • --euc-kr option: Enables reading and writing Java files with EUC-KR encoding

Building from source

mvn install -DskipTests
ls ./core/target/google-java-format-HEAD-SNAPSHOT-all-deps.jar

Using the formatter

From the command-line

find src -name "*.java" -print0 | xargs -0 java -jar google-java-format-HEAD-SNAPSHOT-all-deps.jar -i [--euc-kr]

Options

  • -i: replace source code
  • --euc-kr: reading and writing Java files with EUC-KR encoding

From Java code

String formattedSource = new Formatter().formatSource(sourceString);

or

CharSource source = ...
CharSink output = ...
new Formatter().formatSource(source, output);

Your starting point should be the instance methods of com.google.googlejavaformat.java.Formatter.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

About

Reformats Java source code to comply with Google Java Style.

Resources

Readme
License

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.