pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/google/google-java-format/pull/1415/files

"https://github.githubassets.com/assets/github-59fc16002818df36.css" /> Add --no-aosp flag to select Google Style by hferreiro · Pull Request #1415 · google/google-java-format · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static CommandLineOptions parse(Iterable<String> options) {
case "--offset", "-offset" -> optionsBuilder.addOffset(parseInteger(it, flag, value));
case "--length", "-length" -> optionsBuilder.addLength(parseInteger(it, flag, value));
case "--aosp", "-aosp", "-a" -> optionsBuilder.aosp(true);
case "--no-aosp", "-no-aosp" -> optionsBuilder.aosp(false);
case "--version", "-version", "-v" -> optionsBuilder.version(true);
case "--help", "-help", "-h" -> optionsBuilder.help(true);
case "--fix-imports-only" -> optionsBuilder.fixImportsOnly(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ final class UsageException extends Exception {
File name to use for diagnostics when formatting standard input (default is <stdin>).
--aosp, -aosp, -a
Use AOSP style instead of Google Style (4-space indentation).
--no-aosp, -no-aosp
Use Google Style (2-space indentation). If both --aosp and --no-aosp are given, the last
one wins.
--fix-imports-only
Fix import order and remove any unused imports, but do no other formatting.
--skip-sorting-imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ public void aosp() {
assertThat(CommandLineOptionsParser.parse(Arrays.asList("-aosp")).aosp()).isTrue();
}

@Test
public void noAosp() {
assertThat(CommandLineOptionsParser.parse(Arrays.asList("--no-aosp")).aosp()).isFalse();
assertThat(CommandLineOptionsParser.parse(Arrays.asList("--aosp", "--no-aosp")).aosp())
.isFalse();
assertThat(CommandLineOptionsParser.parse(Arrays.asList("--no-aosp", "--aosp")).aosp())
.isTrue();
}

@Test
public void help() {
assertThat(CommandLineOptionsParser.parse(Arrays.asList("-help")).help()).isTrue();
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy