Skip to content

Commit

Permalink
Merge branch 'main' into 99-shoot-system-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsVistaisCool committed Jan 29, 2024
2 parents 0a2c1b5 + 8fc59a1 commit 298e213
Show file tree
Hide file tree
Showing 29 changed files with 872 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
reviewers:
- "frc-862/reviewers"
schedule:
interval: "weekly"
interval: "daily"
commit-message:
prefix: "[#3] "
labels:
Expand Down
3 changes: 3 additions & 0 deletions .github/linter_suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress checks="HideUtilityClassConstructor"/>
<suppress checks="NewlineAtEndOfFile"/>
<suppress checks="WhitespaceAround"/>
<suppress checks="WhitespaceAfter"/>
Expand All @@ -23,7 +24,9 @@
<suppress checks="TypeName"/>
<suppress checks="TodoComment"/>
<suppress checks="HideUtilityClassConstructor"/>
<suppress checks="MagicNumber"/>
<suppress checks="VisibilityModifier"/> <!-- May delete this one later -->
<suppress checks="MemberName"/> <!-- May delete this one later -->
<suppress checks="FinalParameters"/> <!-- May delete this one later -->
</suppressions>

14 changes: 14 additions & 0 deletions .github/linter_suppressions_limited.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>

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

<suppressions>
<suppress checks="TodoComment"/>
<suppress checks="LineLength"/>
<suppress checks="JavadocPackage"/>
<suppress checks="ConstantName"/>
<suppress checks="JavadocVariable"/>
</suppressions>

11 changes: 7 additions & 4 deletions .github/sun_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@

<!-- Checks whether files end with a new line. -->
<!-- See https://checkstyle.org/checks/misc/newlineatendoffile.html -->
<module name="NewlineAtEndOfFile"/>
<module name="NewlineAtEndOfFile">
<property name="severity" value="warning"/>
</module>

<!-- Checks that property files contain the same keys. -->
<!-- See https://checkstyle.org/checks/misc/translation.html -->
Expand Down Expand Up @@ -130,6 +132,7 @@
</module>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
<property name="severity" value="warning"/>
</module>

<!-- Checks for Size Violations. -->
Expand Down Expand Up @@ -188,11 +191,11 @@
<!-- See https://checkstyle.org/checks/design/index.html -->
<module name="DesignForExtension"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor">
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier">
<property name="severity" value="warning"/>
</module>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>

<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/checks/misc/index.html -->
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Gradle Build

on: [push, pull_request]

jobs:
Build:
runs-on: ubuntu-latest
Expand All @@ -16,8 +18,4 @@ jobs:
- name: Set Execution Permissions
run: chmod +x ./gradlew
- name: Gradle build Rhapsody
run: ./gradlew build
# ENV may not be needed when using thunder, will test later
# env:
# USERNAME: ${{ github.actor }}
# TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
64 changes: 60 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
name: Code Linter
on: [pull_request]

on:
pull_request:
workflow_dispatch:
inputs:
suppressionLevel:
description: 'Suppressions Level'
required: true
default: 'Normal'
type: choice
options:
- Normal
- More
- Show All
lintActions:
description: 'Lint Github Actions'
required: true
default: true
type: boolean
lintMD:
description: 'Lint Markdown'
required: true
default: false
type: boolean
lintXML:
description: 'Lint XML'
required: true
default: false
type: boolean
lintYML:
description: 'Lint YML'
required: true
default: false
type: boolean

env:
suppressionLevel: ${{ github.event_name != 'workflow_dispatch' && 'Normal' || inputs.suppressionLevel }}
lintActions: ${{ github.event_name != 'workflow_dispatch' && 'true' || inputs.lintActions }}
lintMD: ${{ github.event_name != 'workflow_dispatch' && 'false' || inputs.lintMD }}
lintXML: ${{ github.event_name != 'workflow_dispatch' && 'false' || inputs.lintXML }}
lintYML: ${{ github.event_name != 'workflow_dispatch' && 'false' || inputs.lintYML }}

jobs:
Build:
runs-on: ubuntu-latest
Expand All @@ -13,6 +54,20 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Suppressions Level
run: |
if [ "$SUPPRESSIONS" == "Show All" ]; then
echo "Showing ALL Suppressions (Use at your own risk)"
rm .github/linter_suppressions.xml
elif [ "$SUPPRESSIONS" == "More" ]; then
echo "Showing More Suppressions"
rm .github/linter_suppressions.xml
mv .github/linter_suppressions_limited.xml .github/linter_suppressions.xml
else
echo "Using Normal Suppressions"
fi
env:
SUPPRESSIONS: ${{ env.suppressionLevel }}
- name: Java Code Linter
uses: super-linter/super-linter/[email protected]
env:
Expand All @@ -22,12 +77,13 @@ jobs:
JAVA_FILE_NAME: 'sun_checks.xml'
VALIDATE_BASH: false
VALIDATE_BASH_EXEC: false
VALIDATE_GITHUB_ACTIONS: ${{ env.lintActions != 'true' && 'false' || '' }}
VALIDATE_GITLEAKS: false
VALIDATE_GOOGLE_JAVA_FORMAT: false
VALIDATE_GROOVY: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_MARKDOWN: false
VALIDATE_MARKDOWN: ${{ env.lintMD != 'true' && 'false' || '' }}
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_XML: false
VALIDATE_YAML: false
VALIDATE_XML: ${{ env.lintXML != 'true' && 'false' || '' }}
VALIDATE_YAML: ${{ env.lintYML != 'true' && 'false' || '' }}
25 changes: 25 additions & 0 deletions src/main/deploy/pathplanner/autos/1MeterSquareLL.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1.0,
"startingPose": null,
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "test"
}
},
{
"type": "path",
"data": {
"pathName": "1MeterSquareLL"
}
}
]
}
},
"folder": "Test Autos",
"choreoAuto": false
}
25 changes: 25 additions & 0 deletions src/main/deploy/pathplanner/autos/SM-3.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1.0,
"startingPose": null,
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Sipnslow"
}
},
{
"type": "named",
"data": {
"name": "test"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/autos/Spin.auto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"type": "path",
"data": {
"pathName": "Spin"
"pathName": "Spinslow"
}
}
]
Expand Down
49 changes: 49 additions & 0 deletions src/main/deploy/pathplanner/autos/TestNamedCommands.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.0,
"y": 0.0
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "1MeterSquare"
}
},
{
"type": "wait",
"data": {
"waitTime": 2.0
}
},
{
"type": "named",
"data": {
"name": "test"
}
},
{
"type": "wait",
"data": {
"waitTime": 2.0
}
},
{
"type": "path",
"data": {
"pathName": "4MeterSquare"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
24 changes: 24 additions & 0 deletions src/main/deploy/pathplanner/autos/Through_Pieces.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,35 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "disable-Vision"
}
},
{
"type": "path",
"data": {
"pathName": "Run_Through_Pieces"
}
},
{
"type": "named",
"data": {
"name": "test"
}
},
{
"type": "path",
"data": {
"pathName": "StraightOut"
}
},
{
"type": "named",
"data": {
"name": "test"
}
}
]
}
Expand Down
Loading

0 comments on commit 298e213

Please sign in to comment.