Permalink
Browse files

Merge pull request #483 from Pieter12345/checkstyle

Checkstyle
  • Loading branch information...
LadyCailin committed May 13, 2018
2 parents 95670d2 + 7961255 commit b4993e81fc551b063ac8f2ab5197d378fec71ef2
Showing with 4,663 additions and 4,250 deletions.
  1. +41 −0 checkstyle.xml
  2. +59 −30 pom.xml
  3. +1,133 −1,133 src/main/java/com/laytonsmith/PureUtilities/ArgumentParser.java
  4. +1 −1 src/main/java/com/laytonsmith/PureUtilities/ClassLoading/ClassDiscoveryCache.java
  5. +602 −602 src/main/java/com/laytonsmith/PureUtilities/ClassLoading/ClassMirror/ClassMirror.java
  6. +5 −1 src/main/java/com/laytonsmith/PureUtilities/ClassLoading/ClassMirror/ClassMirrorVisitor.java
  7. +4 −4 src/main/java/com/laytonsmith/PureUtilities/Color.java
  8. +10 −10 src/main/java/com/laytonsmith/PureUtilities/Common/FileUtil.java
  9. +1 −1 src/main/java/com/laytonsmith/PureUtilities/Common/WinRegistry.java
  10. +28 −28 src/main/java/com/laytonsmith/PureUtilities/ConcurrentSingletonHashMap.java
  11. +15 −15 src/main/java/com/laytonsmith/PureUtilities/ExhaustiveVisitor.java
  12. +1 −1 src/main/java/com/laytonsmith/PureUtilities/HeapDumper.java
  13. +3 −2 src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java
  14. +6 −6 src/main/java/com/laytonsmith/PureUtilities/PropertiesManager.java
  15. +4 −4 src/main/java/com/laytonsmith/PureUtilities/TermColors.java
  16. +62 −62 src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java
  17. +38 −38 src/main/java/com/laytonsmith/PureUtilities/VirtualFS/FileSystemLayer.java
  18. +9 −1 src/main/java/com/laytonsmith/PureUtilities/Web/WebUtility.java
  19. +1 −1 src/main/java/com/laytonsmith/PureUtilities/ZipMaker.java
  20. +2 −2 src/main/java/com/laytonsmith/PureUtilities/ZipReader.java
  21. +4 −4 src/main/java/com/laytonsmith/PureUtilities/rParser.java
  22. +1 −1 src/main/java/com/laytonsmith/abstraction/MCInventoryHolder.java
  23. +99 −99 src/main/java/com/laytonsmith/abstraction/MCItemMeta.java
  24. +37 −26 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
  25. +5 −5 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBeaconInventory.java
  26. +13 −13 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBrewerInventory.java
  27. +9 −9 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceInventory.java
  28. +75 −2 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java
  29. +9 −9 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBeacon.java
  30. +7 −7 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBrewingStand.java
  31. +3 −3 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCChest.java
  32. +4 −4 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCDropper.java
  33. +7 −7 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCFurnace.java
  34. +3 −3 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCHopper.java
  35. +30 −6 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java
  36. +54 −8 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
  37. +2 −2 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitServerEvents.java
  38. +12 −1 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java
  39. +22 −1 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java
  40. +49 −5 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java
  41. +6 −1 src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitVehicleListener.java
  42. +143 −143 src/main/java/com/laytonsmith/commandhelper/BukkitDirtyRegisteredListener.java
  43. +13 −1 src/main/java/com/laytonsmith/core/ArgumentValidation.java
  44. +1 −1 src/main/java/com/laytonsmith/core/CHLog.java
  45. +10 −10 src/main/java/com/laytonsmith/core/CoreProfile.java
  46. +4 −4 src/main/java/com/laytonsmith/core/GenericTree.java
  47. +2 −2 src/main/java/com/laytonsmith/core/GenericTreeNode.java
  48. +2 −2 src/main/java/com/laytonsmith/core/GenericTreeTraversalOrderEnum.java
  49. +4 −4 src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
  50. +5 −5 src/main/java/com/laytonsmith/core/ParseTree.java
  51. +2 −2 src/main/java/com/laytonsmith/core/Static.java
  52. +5 −5 src/main/java/com/laytonsmith/core/compiler/FileOptions.java
  53. +6 −6 src/main/java/com/laytonsmith/core/compiler/LexerObject.java
  54. +18 −18 src/main/java/com/laytonsmith/core/constructs/CSymbol.java
  55. +9 −9 src/main/java/com/laytonsmith/core/constructs/Token.java
  56. +4 −4 src/main/java/com/laytonsmith/core/events/AbstractEvent.java
  57. +20 −20 src/main/java/com/laytonsmith/core/events/BoundEvent.java
  58. +3 −3 src/main/java/com/laytonsmith/core/events/EventBuilder.java
  59. +13 −1 src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
  60. +28 −4 src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java
  61. +6 −6 src/main/java/com/laytonsmith/core/exceptions/ConfigRuntimeException.java
  62. +1 −1 src/main/java/com/laytonsmith/core/federation/FederationCommunication.java
  63. +2 −2 src/main/java/com/laytonsmith/core/functions/Compiler.java
  64. +11 −11 src/main/java/com/laytonsmith/core/functions/DataHandling.java
  65. +337 −337 src/main/java/com/laytonsmith/core/functions/Debug.java
  66. +31 −31 src/main/java/com/laytonsmith/core/functions/Enchantments.java
  67. +34 −1 src/main/java/com/laytonsmith/core/functions/EntityManagement.java
  68. +4 −4 src/main/java/com/laytonsmith/core/functions/EventBinding.java
  69. +0 −1 src/main/java/com/laytonsmith/core/functions/Federation.java
  70. +45 −45 src/main/java/com/laytonsmith/core/functions/InventoryManagement.java
  71. +5 −5 src/main/java/com/laytonsmith/core/functions/Redis.java
  72. +4 −4 src/main/java/com/laytonsmith/core/functions/Regex.java
  73. +6 −6 src/main/java/com/laytonsmith/core/functions/Routines.java
  74. +3 −3 src/main/java/com/laytonsmith/persistence/DataSourceFilter.java
  75. +1 −1 src/main/java/com/laytonsmith/persistence/DataSourceModel.java
  76. +1 −1 src/main/java/com/laytonsmith/persistence/StringSerializableDataSource.java
  77. +69 −69 src/main/java/com/laytonsmith/tools/UILauncher.java
  78. +1 −1 src/main/java/com/laytonsmith/tools/docgen/DocGenTemplates.java
  79. +184 −184 src/main/java/com/laytonsmith/tools/docgen/DocGenUI.java
  80. +1 −1 src/main/java/com/laytonsmith/tools/docgen/DocGenUIHandler.java
  81. +55 −55 src/main/java/com/laytonsmith/tools/docgen/SingleFunctionDialog.java
  82. +9 −9 src/main/java/com/laytonsmith/tools/docgen/sitedeploy/SiteDeploy.java
  83. +149 −149 src/main/java/com/laytonsmith/tools/pnviewer/ConfigurationLoaderDialog.java
  84. +160 −160 src/main/java/com/laytonsmith/tools/pnviewer/ManageBookmarksDialog.java
  85. +238 −238 src/main/java/com/laytonsmith/tools/pnviewer/PNViewer.java
  86. +10 −9 src/test/java/com/laytonsmith/PureUtilities/ClassLoading/GeneralTest.java
  87. +2 −1 src/test/java/com/laytonsmith/PureUtilities/Common/GNUErrorMessageFormatTest.java
  88. +4 −2 src/test/java/com/laytonsmith/PureUtilities/ConcurrentSingletonHashMapTest.java
  89. +9 −9 src/test/java/com/laytonsmith/PureUtilities/ZipMakerTest.java
  90. +7 −7 src/test/java/com/laytonsmith/PureUtilities/ZipReaderTest.java
  91. +110 −110 src/test/java/com/laytonsmith/core/MethodScriptCompilerTest.java
  92. +6 −2 src/test/java/com/laytonsmith/core/NewExceptionHandlingTest.java
  93. +36 −36 src/test/java/com/laytonsmith/core/OptimizationTest.java
  94. +1 −1 src/test/java/com/laytonsmith/core/PrefsTest.java
  95. +87 −87 src/test/java/com/laytonsmith/core/ScriptTest.java
  96. +27 −27 src/test/java/com/laytonsmith/core/TypeHintingTest.java
  97. +3 −1 src/test/java/com/laytonsmith/core/constructs/ClassInfoTest.java
  98. +2 −1 src/test/java/com/laytonsmith/core/constructs/InstanceofUtilTest.java
  99. +5 −1 src/test/java/com/laytonsmith/core/constructs/TestCClassType.java
  100. +38 −38 src/test/java/com/laytonsmith/core/events/GeneralTest.java
  101. +15 −15 src/test/java/com/laytonsmith/core/functions/BasicLogicTest.java
  102. +10 −10 src/test/java/com/laytonsmith/core/functions/DataHandlingTest.java
  103. +11 −11 src/test/java/com/laytonsmith/core/functions/EchoesTest.java
  104. +17 −17 src/test/java/com/laytonsmith/core/functions/MinecraftTest.java
  105. +56 −56 src/test/java/com/laytonsmith/core/functions/PermissionsTest.java
  106. +31 −31 src/test/java/com/laytonsmith/core/functions/PlayerManangementTest.java
  107. +11 −11 src/test/java/com/laytonsmith/core/functions/bash/BashCompilerBasicTest.java
  108. +4 −4 src/test/java/com/laytonsmith/persistence/TestPersistence.java
  109. +2 −2 src/test/java/com/laytonsmith/testing/ArrayTest.java
  110. +9 −7 src/test/java/com/laytonsmith/testing/RandomTests.java
  111. +25 −27 src/test/java/com/laytonsmith/testing/StaticTest.java
@@ -0,0 +1,41 @@
<?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">
<!--
Checkstyle-Configuration: CommandHelper
Description: A checkstyle configuration for CommandHelper.
Author: P.J.S. Kools
-->
<module name="Checker">
<property name="severity" value="error"/>
<module name="TreeWalker">
<!-- Line length <= 120 characters. -->
<module name="LineLength">
<property name="severity" value="ignore"/> <!-- TODO: Change to "error" once the >7000 violations have been resolved. -->
<property name="max" value="120"/>
</module>
<!-- Indent must use tab characters. -->
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* ([^\*]|$)"/> <!-- Javadoc and multiline comments have a single leading whitespace, so allow " *". -->
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="false"/>
</module>
<!-- Disallow package.* imports. -->
<module name="AvoidStarImport"/>
<!-- Disallow whitespaces after '(' and before ')'. -->
<module name="ParenPad"/>
</module>
<!-- Disallow trailing whitespaces/tabs. -->
<module name="RegexpSingleline">
<property name="severity" value="error"/>
<property name="format" value="(?&lt;! \*)\s+$"/> <!-- Empty javadoc and multiline comment lines have a single trailing whitespace, so allow " * ". -->
<property name="message" value="Line has trailing whitespaces/tabs."/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
</module>
89 pom.xml
@@ -198,12 +198,14 @@
</dependency>
<!-- Used for IRC hooks -->
<!--<dependency> NOT READY YET
<groupId>org.jibble</groupId>
<artifactId>pircbot</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>-->
<!-- NOT READY YET
<dependency>
<groupId>org.jibble</groupId>
<artifactId>pircbot</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
-->
<!-- Profiling library -->
<dependency>
@@ -278,17 +280,17 @@
<!-- Evil-y things (currently not used) -->
<!--<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
<type>jar</type>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.15.0-GA</version>
<type>jar</type>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.15.0-GA</version>
<type>jar</type>
</dependency>-->
<!-- Embedded SSH Client -->
<dependency>
@@ -305,13 +307,13 @@
<artifactId>jchardet</artifactId>
<version>1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client -->
<dependency>
<!-- Apache License 2.0 -->
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>1.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client -->
<dependency>
<!-- Apache License 2.0 -->
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Test libraries -->
<!-- Hamcrest must come before powermock -->
<dependency>
@@ -488,7 +490,7 @@
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugin>
<!-- Shade plugin -->
<plugin>
@@ -503,13 +505,13 @@
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>full</shadedClassifierName>
<minimizeJar>false</minimizeJar>
<!-- To add a new shaded dependency, there are three steps.
1. Add a reference to the artifact set
2. Add a relocation tag (usually recommended, though not always)
3. Add it to the filter list
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>full</shadedClassifierName>
<minimizeJar>false</minimizeJar>
<!-- To add a new shaded dependency, there are three steps.
1. Add a reference to the artifact set
2. Add a relocation tag (usually recommended, though not always)
3. Add it to the filter list
You can copy existing structures over, and change the parameters on them.
-->
@@ -912,6 +914,33 @@
</execution>
</executions>
</plugin>
<!-- Checkstyle plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<sourceDirectories>${project.compileSourceRoots}</sourceDirectories>
<testSourceDirectories>${project.testCompileSourceRoots}</testSourceDirectories>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Oops, something went wrong.

0 comments on commit b4993e8

Please sign in to comment.