Skip to content

Commit

Permalink
Checkstyle finally works
Browse files Browse the repository at this point in the history
  • Loading branch information
Errelian committed Apr 13, 2021
1 parent 2bb634a commit 43d4a39
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 12 deletions.
11 changes: 11 additions & 0 deletions checkstyle-supressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.0//EN"
"https://checkstyle.org/dtds/suppressions_1_0.dtd">

<suppressions>
<suppress checks="JavadocStyleCheck"
files="module-info.java"
lines="50-9999"/>
</suppressions>
5 changes: 4 additions & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<module name="MissingJavadocPackage" />
<module name="JavadocType" />
<module name="JavadocMethod" />
<module name="JavadocStyle" />
<module name="JavadocStyle" />
</module>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
</module>
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,36 @@
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<excludes>**/module-info.java</excludes>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>
checkstyle
</report>
</reports>
</reportSet>
</reportSets>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
</plugins>
</reporting>

</project>
11 changes: 0 additions & 11 deletions src/main/java/fitnessTracker2/FXMLController.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ public class FXMLController implements Initializable {
@FXML
private void loadButtonAction(ActionEvent event) {

/*try {
JsonHandler.load(JsonHandlerEnum.SESSION);
Logger.info("Successful load!");
}
catch(Exception e)
{
Logger.error("Unsuccessful load!");
}*/

FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("/fxml/Load.fxml"));

Expand Down
1 change: 1 addition & 0 deletions src/main/java/fitnessTracker2/JsonHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ else if(fileType == JsonHandlerEnum.PROFILE)
/**
* @param fileType The Type of the file that needs to be saved, enum.
* @return Boolean, whatever the saving was successful or not.
* @param filePath the path to the file where the data will be saved.
* @throws IOException on IOException.
*/
public static boolean save(JsonHandlerEnum fileType, File filePath) throws IOException{
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* The module info file.
*/
module fitnessTracker2 {
requires javafx.controls;
requires javafx.fxml;
Expand Down

0 comments on commit 43d4a39

Please sign in to comment.