Skip to content

Commit

Permalink
i think it works now
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan1522 committed Oct 6, 2024
1 parent 57bf32d commit 5c12256
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ jobs:
- uses: pmd/pmd-github-action@v2
with:
rulesets: 'pmd-ruleset.xml'
analyzeModifiedFilesOnly: false
analyzeModifiedFilesOnly: false
# failOnWarnings: false
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
23 changes: 12 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "com.peterabeles.gversion" version "1.10"
id "com.diffplug.spotless" version "6.25.0"
id "com.google.protobuf" version "0.9.4"
id "pmd"
}

def grpcVersion = '1.61.0' // CURRENT_GRPC_VERSION
Expand Down Expand Up @@ -235,8 +236,8 @@ gversion {
indent = " "
}
// Spotless formatting
project.compileJava.dependsOn(spotlessApply)
spotless {
enforceCheck = false
java {
target fileTree('.') {
include '**/*.java'
Expand Down Expand Up @@ -279,13 +280,13 @@ spotless {
}
}

// apply plugin: "pmd"

// pmd {
// toolVersion = "7.3.0"
// consoleOutput = true
// sourceSets = [project.sourceSets["main"]]
// reportsDir = file("${project.buildDir}/reports/pmd")
// ruleSetFiles = files(file("$rootDir/pmd-ruleset.xml"))
// ruleSets = []
// }
// PMD configuration
pmd {
ignoreFailures = true
toolVersion = "7.3.0"
consoleOutput = true
sourceSets = [project.sourceSets["main"]]
reportsDir = file("${project.buildDir}/reports/pmd")
ruleSetFiles = files(file("$rootDir/pmd-ruleset.xml"))
ruleSets = []
}
8 changes: 4 additions & 4 deletions pmd-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="WPILibRuleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">

<description>PMD Ruleset for WPILib</description>

Expand Down Expand Up @@ -34,7 +34,7 @@
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod">
<properties>
<property name="violationSuppressRegex"
value=".*'.*Arguments\(\)'.*" />
value=".*'.*Arguments\(\)'.*" />
</properties>
</rule>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public String toString() {
}

/** Compare lexicographically. */
@Override
public int compareTo(PolynomialRegression that) {
double EPSILON = 1E-5;
int maxDegree = Math.max(this.degree(), that.degree());
Expand Down

0 comments on commit 5c12256

Please sign in to comment.