From 3a8051898a0ca7e51cc018b3836e34ff8d310ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= <mvdan@mvdan.cc> Date: Tue, 29 Dec 2015 22:16:18 +0100 Subject: [PATCH] checkstyle: be more strict with curly rules --- F-Droid/src/org/fdroid/fdroid/FDroidApp.java | 3 ++- config/checkstyle/checkstyle.xml | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/FDroidApp.java b/F-Droid/src/org/fdroid/fdroid/FDroidApp.java index 466e55577..5e6b856ef 100644 --- a/F-Droid/src/org/fdroid/fdroid/FDroidApp.java +++ b/F-Droid/src/org/fdroid/fdroid/FDroidApp.java @@ -280,7 +280,8 @@ public class FDroidApp extends Application { public String generate(String imageUri) { return imageUri.substring( imageUri.lastIndexOf('/') + 1); - } }, + } + }, // 30 days in secs: 30*24*60*60 = 2592000 2592000) ) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 70e9127e0..023f80ae7 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -37,10 +37,6 @@ <module name="UnusedImports" /> <module name="OuterTypeFilename" /> - <!--<module name="LineLength">--> - <!--<module name="MethodLength" />--> - <!--<module name="ParameterNumber" />--> - <module name="Indentation"> <property name="basicOffset" value="4"/> <property name="braceAdjustment" value="0"/> @@ -90,9 +86,15 @@ <module name="AnnotationLocation" /> <module name="AvoidNestedBlocks" /> - <module name="LeftCurly" /> + <module name="LeftCurly"> + <property name="maxLineLength" value="100"/> + </module> <!--<module name="NeedBraces" />--> - <module name="RightCurly" /> + <module name="RightCurly"/> + <module name="RightCurly"> + <property name="option" value="alone"/> + <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/> + </module> <module name="EmptyStatement" /> <!--<module name="HiddenField" />-->