-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IDE configuration and checkstyle
Fixes #89
- Loading branch information
Showing
4 changed files
with
491 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# jDiameter IDE Configurations | ||
|
||
In this folder you will find configurations for IDEs to proper format and style check the source files for jDiameter project. | ||
|
||
The `checkstyle.xml` file is used by maven configuration and can be imported to most IDEs for checking code style. It requires a plugin to properly function, which can be obtained at: | ||
- [Eclipse Checkstyle Plugin](http://eclipse-cs.sourceforge.net/#!/) | ||
- [CheckStyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) | ||
- [Checkstyle Beans](http://plugins.netbeans.org/plugin/3413/checkstyle-beans) | ||
|
||
Additionaly configuration files for proper code formatting are provided in the respective directories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | ||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | ||
<!-- | ||
TeleStax, Open Source Cloud Communications | ||
Copyright 2011-2017, TeleStax Inc. and individual contributors | ||
by the @authors tag. | ||
This program is free software: you can redistribute it and/or modify | ||
under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation; either version 3 of | ||
the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/> | ||
--> | ||
|
||
<module name="Checker"> | ||
|
||
<!-- Checks for whitespace --> | ||
<!-- See http://checkstyle.sf.net/config_whitespace.html --> | ||
<module name="FileTabCharacter"> | ||
<property name="eachLine" value="true"/> | ||
</module> | ||
|
||
<!-- Trailing spaces regex. --> | ||
<!-- See http://checkstyle.sf.net/config_misc.html --> | ||
<module name="RegexpSingleline"> | ||
<!-- \s matches whitespace character, $ matches end of line. --> | ||
<property name="format" value="\s+$"/> | ||
<property name="message" value="Line has trailing spaces."/> | ||
</module> | ||
|
||
<module name="TreeWalker"> | ||
|
||
<!-- Checks for Size Violations. --> | ||
<!-- See http://checkstyle.sf.net/config_sizes.html --> | ||
<module name="LineLength"> | ||
<property name="max" value="160"/> | ||
<property name="ignorePattern" value="^\s*//.*|^package.*|^import.*|a href|href|http://|https://|ftp://"/> | ||
</module> | ||
|
||
<!-- Indentation checks. --> | ||
<!-- See http://checkstyle.sf.net/config_misc.html --> | ||
<module name="Indentation"> | ||
<property name="basicOffset" value="2"/> | ||
<property name="braceAdjustment" value="0"/> | ||
<property name="caseIndent" value="2"/> | ||
<property name="throwsIndent" value="4"/> | ||
<property name="lineWrappingIndentation" value="4"/> | ||
<property name="arrayInitIndent" value="2"/> | ||
</module> | ||
|
||
|
||
<module name="OneStatementPerLine"/> | ||
|
||
<!-- Checks for imports --> | ||
<!-- See http://checkstyle.sf.net/config_import.html --> | ||
<module name="AvoidStarImport"> | ||
<property name="allowStaticMemberImports" value="true"/> | ||
</module> | ||
<module name="RedundantImport"/> | ||
<module name="UnusedImports" /> | ||
<module name="IllegalImport"> | ||
<property name="illegalPkgs" value="junit.framework"/> | ||
</module> | ||
|
||
<!-- Modifier Checks --> | ||
<!-- See http://checkstyle.sf.net/config_modifiers.html --> | ||
<module name="ModifierOrder"/> | ||
<module name="RedundantModifier"/> | ||
|
||
<!-- Checks for blocks. You know, those {}'s --> | ||
<!-- See http://checkstyle.sf.net/config_blocks.html --> | ||
<module name="LeftCurly"/> | ||
<module name="NeedBraces"/> | ||
|
||
<!-- Checks for common coding problems --> | ||
<!-- See http://checkstyle.sf.net/config_coding.html --> | ||
<!-- Disabled until http://sourceforge.net/tracker/?func=detail&aid=2843447&group_id=29721&atid=397078 is fixed--> | ||
<!--<module name="DoubleCheckedLocking"/>--> | ||
<module name="EmptyStatement"/> | ||
<module name="EmptyBlock"> | ||
<property name="option" value="TEXT"/> | ||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/> | ||
</module> | ||
<module name="EqualsHashCode"/> | ||
<module name="IllegalInstantiation"/> | ||
|
||
<!-- Miscellaneous other checks. --> | ||
<!-- See http://checkstyle.sf.net/config_misc.html --> | ||
<module name="UpperEll"/> | ||
<module name="PackageAnnotation"/> | ||
<module name="CovariantEquals"/> | ||
<module name="ArrayTypeStyle"/> | ||
|
||
</module> | ||
|
||
</module> |
Oops, something went wrong.