-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first commit * remove alerts * what * j * more unit conversions * things * more units * add ci * more units * format * push * comment out alerts bc no worky * refactor frc.robot.extras.simulation directory * format again * comment out broken build thingy * changes + format * idk * some stuff * ok * bruuuuuuuuuuuuuuuuuuuuuuuuuuuh * clean up constants * more constants * constants * yay pose estimation * ok * add back alerts
- Loading branch information
Showing
53 changed files
with
1,063 additions
and
1,020 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,62 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Compile Java | ||
runs-on: ubuntu-latest | ||
container: wpilib/roborio-cross-ubuntu:2024-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Compile robot code | ||
run: ./gradlew compileJava | ||
|
||
test: | ||
name: "Test Java" | ||
runs-on: ubuntu-latest | ||
container: wpilib/roborio-cross-ubuntu:2024-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Run tests on robot code | ||
run: ./gradlew test -PrunTests | ||
|
||
format: | ||
name: "Check Format Java" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Fetch all history and metadata | ||
run: | | ||
git checkout -b pr | ||
git branch -f main origin/main | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
- name: Run formatter | ||
run: ./gradlew spotlessCheck | ||
|
||
lint: | ||
name: "Lint" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- uses: pmd/pmd-github-action@v2 | ||
with: | ||
rulesets: 'pmd-ruleset.xml' | ||
analyzeModifiedFilesOnly: false |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"enableCppIntellisense": false, | ||
"currentLanguage": "java", | ||
"projectYear": "2024", | ||
"projectYear": "2025beta", | ||
"teamNumber": 4829 | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
# 4829-BaseRobotCode-2025 | ||
# 4829-BaseRobotCode-2025 |
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
Binary file not shown.
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
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
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
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,94 @@ | ||
<?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"> | ||
|
||
<description>PMD Ruleset for WPILib</description> | ||
|
||
<exclude-pattern>.*/LimeligtHelpers.java</exclude-pattern> | ||
|
||
<rule ref="category/java/bestpractices.xml"> | ||
<exclude name="AccessorClassGeneration" /> | ||
<exclude name="AccessorMethodGeneration" /> | ||
<exclude name="AvoidPrintStackTrace" /> | ||
<exclude name="AvoidReassigningCatchVariables" /> | ||
<exclude name="AvoidReassigningParameters" /> | ||
<exclude name="AvoidUsingHardCodedIP" /> | ||
<exclude name="ConstantsInInterface" /> | ||
<exclude name="JUnitAssertionsShouldIncludeMessage" /> | ||
<exclude name="JUnitTestContainsTooManyAsserts" /> | ||
<exclude name="JUnitTestsShouldIncludeAssert" /> | ||
<exclude name="JUnit4TestShouldUseAfterAnnotation" /> | ||
<exclude name="JUnit4TestShouldUseBeforeAnnotation" /> | ||
<exclude name="JUnit4TestShouldUseTestAnnotation" /> | ||
<exclude name="LooseCoupling" /> | ||
<exclude name="PreserveStackTrace" /> | ||
<exclude name="ReplaceHashtableWithMap" /> | ||
<exclude name="ReplaceVectorWithList" /> | ||
<exclude name="SwitchStmtsShouldHaveDefault" /> | ||
<exclude name="SystemPrintln" /> | ||
<exclude name="UseVarargs" /> | ||
</rule> | ||
|
||
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"> | ||
<properties> | ||
<property name="violationSuppressRegex" | ||
value=".*'.*Arguments\(\)'.*" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"> | ||
<properties> | ||
<property name="violationSuppressXPath" value="//Resource" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/design.xml"> | ||
<exclude name="AvoidThrowingRawExceptionTypes" /> | ||
<exclude name="AvoidThrowingNewInstanceOfSameException" /> | ||
<exclude name="CognitiveComplexity" /> | ||
<exclude name="CouplingBetweenObjects" /> | ||
<exclude name="CyclomaticComplexity" /> | ||
<exclude name="DataClass" /> | ||
<exclude name="ExceptionAsFlowControl" /> | ||
<exclude name="ExcessiveImports" /> | ||
<exclude name="ExcessiveParameterList" /> | ||
<exclude name="ExcessivePublicCount" /> | ||
<exclude name="GodClass" /> | ||
<exclude name="LawOfDemeter" /> | ||
<exclude name="LoosePackageCoupling" /> | ||
<exclude name="NPathComplexity" /> | ||
<exclude name="NcssCount" /> | ||
<exclude name="TooManyFields" /> | ||
<exclude name="TooManyMethods" /> | ||
</rule> | ||
|
||
<rule ref="category/java/errorprone.xml"> | ||
<exclude name="AssignmentToNonFinalStatic" /> | ||
<exclude name="AvoidCatchingThrowable" /> | ||
<exclude name="AvoidDuplicateLiterals" /> | ||
<exclude name="AvoidLiteralsInIfCondition" /> | ||
<exclude name="CloseResource" /> | ||
<exclude name="ConstructorCallsOverridableMethod" /> | ||
<exclude name="DoNotTerminateVM" /> | ||
<exclude name="EmptyCatchBlock" /> | ||
<exclude name="FinalizeDoesNotCallSuperFinalize" /> | ||
<exclude name="JUnitSpelling" /> | ||
<exclude name="MissingSerialVersionUID" /> | ||
<exclude name="NonSerializableClass" /> | ||
<exclude name="NullAssignment" /> | ||
</rule> | ||
|
||
<rule ref="category/java/multithreading.xml"> | ||
<exclude name="AvoidSynchronizedAtMethodLevel" /> | ||
<exclude name="AvoidUsingVolatile" /> | ||
<exclude name="DoNotUseThreads" /> | ||
<exclude name="UseConcurrentHashMap" /> | ||
</rule> | ||
|
||
<rule ref="category/java/performance.xml"> | ||
<exclude name="AvoidInstantiatingObjectsInLoops" /> | ||
</rule> | ||
|
||
</ruleset> |
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
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
package frc.robot; | ||
|
||
/** | ||
* Automatically generated file containing build version information. | ||
*/ | ||
/** Automatically generated file containing build version information. */ | ||
public final class BuildConstants { | ||
public static final String MAVEN_GROUP = ""; | ||
public static final String MAVEN_NAME = "fuck"; | ||
public static final String MAVEN_NAME = "4829-BaseRobotCode-2025-1"; | ||
public static final String VERSION = "unspecified"; | ||
public static final int GIT_REVISION = 1; | ||
public static final String GIT_SHA = "c788c01f09c748b73747c452d0f82b20b8bf8d5d"; | ||
public static final String GIT_DATE = "2024-10-22 22:41:55 EDT"; | ||
public static final String GIT_BRANCH = "main"; | ||
public static final String BUILD_DATE = "2024-10-22 22:45:01 EDT"; | ||
public static final long BUILD_UNIX_TIME = 1729651501218L; | ||
public static final int GIT_REVISION = 22; | ||
public static final String GIT_SHA = "ee746c8ba2b3fd21fde3a8e41cdd2f213deee1be"; | ||
public static final String GIT_DATE = "2024-10-27 14:01:12 EDT"; | ||
public static final String GIT_BRANCH = "k"; | ||
public static final String BUILD_DATE = "2024-10-27 14:10:44 EDT"; | ||
public static final long BUILD_UNIX_TIME = 1730052644497L; | ||
public static final int DIRTY = 1; | ||
|
||
private BuildConstants(){} | ||
private BuildConstants() {} | ||
} |
Oops, something went wrong.