Skip to content

Commit

Permalink
comodor javee8 maven project
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaiemil committed Oct 27, 2017
1 parent c3e0d62 commit 428ed2a
Show file tree
Hide file tree
Showing 16 changed files with 793 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
@@ -0,0 +1,12 @@
# Check out all text files in UNIX format, with LF as end of line

*.java text=auto eol=lf
*.xml text=auto eol=lf
*.txt text=auto eol=lf
*.json text=auto eol=lf

*.java ident
*.xml ident
*.txt ident
*.json ident

13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
/.idea
*.iml
.classpath
.project
target/
.settings/
*.log*
bin/
*/settings.xml
*/pubring.gpg
*/secring.gpg


296 changes: 296 additions & 0 deletions checkstyle.xml
@@ -0,0 +1,296 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
Copyright (c) 2016-2017, Mihai Emil Andronache
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1)Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2)Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3)Neither the name of charles-rest nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@link http://checkstyle.sourceforge.net/config.html
-->
<module name="Checker">

<!--
Enforces English locale to be independent from the
default locale which may vary between environments.
-->
<property name="localeLanguage" value="en"/>

<!--
Checks that property files contain the same keys.
-->
<module name="Translation"/>

<!-- Checks for duplicate code -->
<!-- https://sourceforge.net/p/checkstyle/bugs/693/ -->
<!-- <module name="StrictDuplicateCode"/> -->

<!--
Maximum number of lines in any .java file is limited.
-->
<module name="FileLength">
<property name="max" value="1000"/>
<property name="fileExtensions" value="java"/>
</module>

<!--
TAB chars are not allowed anywhere.
-->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<property name="fileExtensions" value="java,txt,xml,xsl,xsd,properties,groovy,vm,MF,sh,sql,tokens,g,spec,css,csv"/>
</module>

<!--
C++ style inline comment is not allowed.
-->
<module name="RegexpSingleline">
<property name="format" value="/\*.*\*/"/>
<property name="message" value="This kind of comment is not allowed."/>
</module>

<!--
Windows line endings are not allowed.
-->
<module name="RegexpMultiline">
<property name="format" value="\r\n$"/>
<property name="message"
value="Lines in file should end with Unix-like end of line"/>
</module>

<!--
JavaDoc regexp checks
-->
<module name="RegexpSingleline">
<property name="format" value="/\*\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="/\*\*\W+\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\(this\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Using THIS as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\([\w\.]\.class\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Using class as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="org\.apache\.commons\.(codec|lang3?)\.CharEncoding"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Use 'java.nio.charset.StandardCharsets' instead"/>
</module>

<!--
Enable suppressions
-->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="@checkstyle (\w+) \((\d+) lines?\)"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="$2"/>
</module>

<module name="TreeWalker">
<property name="cacheFile" value="target/qulice_cachefile" />

<!-- to enable suppressions -->
<module name="FileContentsHolder"/>

<!-- Checks for blocks. -->
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="AvoidNestedBlocks"/>

<!-- Checks for class design. -->
<module name="VisibilityModifier"/>
<module name="FinalClass"/>
<module name="InterfaceIsType"/>
<module name="HideUtilityClassConstructor"/>
<module name="DesignForExtension"/>
<module name="MutableException"/>
<module name="ThrowsCount" />
<module name="InnerTypeLast"/>

<!-- Checks for common coding problems -->
<module name="ArrayTrailingComma"/>
<module name="AvoidInlineConditionals"/>
<module name="CovariantEquals"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="FinalLocalVariable"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
</module>
<module name="IllegalInstantiation"/>
<module name="IllegalToken">
<property name="tokens" value="POST_INC, POST_DEC"/>
</module>
<module name="IllegalTokenText" />
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="NestedForDepth"/>
<module name="NestedIfDepth"/>
<module name="NestedTryDepth"/>
<module name="NoClone"/>
<module name="NoFinalizer"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="IllegalCatch"/>
<module name="IllegalThrows"/>
<module name="PackageDeclaration"/>
<module name="ReturnCount">
<property name="max" value="1"/>
</module>
<module name="IllegalType"/>
<module name="ParameterAssignment"/>
<module name="ExplicitInitialization"/>
<module name="DefaultComesLast"/>
<module name="FallThrough"/>
<module name="MultipleVariableDeclarations"/>
<module name="RequireThis"/>
<module name="UnnecessaryParentheses"/>
<module name="OneStatementPerLine"/>

<!-- Checks for imports. -->
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>

<module name="NoLineWrap"/>

<!-- Checks for Javadoc comments. -->
<module name="JavadocType">
<property name="allowUnknownTags" value="true"/>
</module>
<module name="JavadocMethod"/>
<module name="JavadocVariable"/>
<module name="JavadocStyle"/>

<!-- Metrics. -->
<module name="BooleanExpressionComplexity"/>
<module name="ClassDataAbstractionCoupling"/>
<module name="ClassFanOutComplexity">
<!--
Total number of classes that a particular class
depends on. We're increasing this value because
default "20" is too low.
-->
<property name="max" value="30"/>
</module>
<module name="CyclomaticComplexity"/>
<module name="NPathComplexity"/>
<module name="JavaNCSS"/>

<!-- Miscellaneous other checks. -->
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="ArrayTypeStyle"/>
<module name="FinalParameters">
<property name="tokens" value="CTOR_DEF,METHOD_DEF,FOR_EACH_CLAUSE,LITERAL_CATCH"/>
</module>
<module name="Indentation"/>
<module name="CommentsIndentation"/>
<module name="TrailingComment"/>
<module name="OuterTypeFilename"/>

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

<!-- Checks for Naming Conventions. -->
<module name="AbbreviationAsWordInNameCheck">
<property name="allowedAbbreviations" value="IT"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName">
<property name="format" value="^(id|[A-Za-z]{3,20})$"/>
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="LocalVariableName">
<property name="format" value="^(id|[A-Za-z]{3,20})$"/>
</module>
<module name="CatchParameterName">
<property name="format" value="^(ex|[A-Za-z]{3,20})$"/>
</module>
<module name="MemberName">
<property name="format" value="^(id|[A-Za-z]{3,20})$"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z]{2,}[a-zA-Z]+$"/>
</module>
<module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName">
<property name="format" value="^(id|[A-Za-z]{3,})$"/>
</module>
<module name="StaticVariableName"/>
<module name="TypeName"/>

<!-- Checks for Size Violations. -->
<module name="ExecutableStatementCount">
<property name="max" value="20"/>
</module>
<module name="LineLength">
<property name="max" value="80"/>
<property name="ignorePattern" value="^import .*$|^\s+\*\s.*https?:\/\/.+"/>
</module>
<module name="AnonInnerLength" />
<module name="MethodLength"/>
<module name="ParameterNumber">
<property name="max" value="3"/>
</module>
<module name="OuterTypeNumber"/>
<module name="MethodCount"/>

<!-- Checks for whitespace. -->
<module name="GenericWhitespace"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>

</module>

</module>

0 comments on commit 428ed2a

Please sign in to comment.