From 6394a7371390587a90664201c612059d961b240a Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 30 Apr 2018 15:38:14 -0700 Subject: Add tools/ to the style-checking path. Test: Touch a Java file in tools/. `repo upload` gives warnings. Change-Id: I381b01038d8a0c0e90817e383ca5323908fdd592 --- PREUPLOAD.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg index 108429193..28aa06f45 100644 --- a/PREUPLOAD.cfg +++ b/PREUPLOAD.cfg @@ -7,5 +7,4 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} - -fw updater_sample/ - + --file_whitelist tools/ updater_sample/ -- cgit v1.2.3 From 529bb742b791a4396b36472c8cc54d181bf88fdc Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 6 Nov 2018 11:24:53 -0800 Subject: image_generator: Fix the warnings on import order. [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:36: Wrong order for java.util.StringTokenizer import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS: [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:43: Wrong order for org.apache.commons.cli.CommandLine import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS: [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:50: Extra separation in import group before 'org.w3c.dom.Document' Test: `mmma -j bootable/recovery` Test: `repo upload` no longer gives warnings. Change-Id: If24c6b7ca33b9223b3e326a48885c24c35b5fa68 --- tools/image_generator/ImageGenerator.java | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/image_generator/ImageGenerator.java b/tools/image_generator/ImageGenerator.java index 8ed696a45..8cdd4944a 100644 --- a/tools/image_generator/ImageGenerator.java +++ b/tools/image_generator/ImageGenerator.java @@ -16,6 +16,16 @@ package com.android.recovery.tools; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.OptionBuilder; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + import java.awt.Color; import java.awt.Font; import java.awt.FontFormatException; @@ -32,25 +42,14 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import java.util.TreeMap; import java.util.StringTokenizer; +import java.util.TreeMap; import javax.imageio.ImageIO; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.GnuParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.OptionBuilder; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - /** * Command line tool to generate the localized image for recovery mode. */ @@ -552,4 +551,3 @@ public class ImageGenerator { imageGenerator.generateImage(localizedStringMap, cmd.getOptionValue("output_file")); } } - -- cgit v1.2.3