Skip to content

Commit

Permalink
Change to Unix line-ending (\n) & double space indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Jan 3, 2022
1 parent a246be6 commit 65c5d4d
Show file tree
Hide file tree
Showing 114 changed files with 20,686 additions and 20,624 deletions.
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ plugins {

/* Generate Java code from XSD */
id 'org.unbroken-dome.xjc' version '2.0.0'

id 'checkstyle'
}

apply plugin: "edu.sc.seis.launch4j"

version '2.3.0'

sourceCompatibility = 7
targetCompatibility = 7
sourceCompatibility = 8
targetCompatibility = 8

project.mainClassName = 'listfix.view.GUIScreen'

Expand Down Expand Up @@ -102,6 +104,10 @@ tasks.register('makeIcon', Svg2IcoTask) {
destination = new File('website/favicon.ico')
}

tasks.withType(Checkstyle) {
exclude 'listfix/model/playlists/winamp/generated/**.java'
}

// https://github.com/TheBoegl/gradle-launch4j
launch4j {
headerType='gui'
Expand Down
108 changes: 108 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">

<module name="Checker">
<!--Checks whether files end with a new line.-->
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
<property name="fileExtensions" value="java, xml, properties, js, html, css" />
</module>

<module name="FileLength">
<property name="max" value="4000"/>
</module>

<!-- <module name="LineLength">
<property name="max" value="180"/>
</module>-->

<module name="FileTabCharacter"/>

<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing whitespace."/>
<property name="ignoreComments" value="true"/>
</module>

<!--Checks for imports-->
<!--<module name="AvoidStarImport"/>-->
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="MethodParamPad">
<property name="option" value="nospace"/>
<property name="allowLineBreaks" value="false"/>
</module>

<!--Checks for Size Violations.-->
<module name="MethodLength">
<property name="max" value="700"/>
</module>
<module name="ParameterNumber">
<property name="max" value="20"/>
</module>

<!--Checks for whitespace-->
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<!--<module name="OperatorWrap"/>-->
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA, SEMI, LITERAL_IF, LITERAL_ELSE, LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE "/>
</module>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="GenericWhitespace"/>

<!--Modifier Checks-->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="PackageAnnotation"/>

<!--Checks for blocks. You know, those {}'s-->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_TRY"/>
</module>
<module name="LeftCurly">
<property name="option" value="nl"/>
<property name="tokens" value="CLASS_DEF,INTERFACE_DEF"/>
</module>
<module name="RightCurly">
<property name="option" value="alone_or_singleline"/>
<property name="tokens" value="LITERAL_IF, METHOD_DEF"/>
</module>

<!--Checks for common coding problems-->
<module name="InnerAssignment"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="CovariantEquals"/>
<module name="ModifiedControlVariable"/>
<module name="OneStatementPerLine"/>
<module name="EmptyStatement"/>
<module name="DefaultComesLast"/>

<!--Checks for class design-->
<!-- <module name="VisibilityModifier"/>-->
<module name="FinalClass"/>
<module name="InterfaceIsType"/>

<!--Miscellaneous other checks.-->
<module name="ArrayTypeStyle"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="CyclomaticComplexity">
<property name="max" value="36"/>
</module>

</module>
</module>
4 changes: 2 additions & 2 deletions src/commons-logging.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Configuration of the logging service occurs in file "simplelog.properties".
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
# Configuration of the logging service occurs in file "simplelog.properties".
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
Loading

0 comments on commit 65c5d4d

Please sign in to comment.