mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ci] Add CI spelling check and fix spelling errors (#8882)
reviewdog/action-misspell is used on frc-docs. It has a dictionary of commonly misspelled words, so it has less false positives then other tools.
This commit is contained in:
24
.github/workflows/lint-format.yml
vendored
24
.github/workflows/lint-format.yml
vendored
@@ -123,3 +123,27 @@ jobs:
|
|||||||
echo '' >> $GITHUB_STEP_SUMMARY
|
echo '' >> $GITHUB_STEP_SUMMARY
|
||||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|
||||||
|
check-spelling:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: misspell
|
||||||
|
uses: reviewdog/action-misspell@v1
|
||||||
|
with:
|
||||||
|
reporter: "github-check"
|
||||||
|
fail_level: "error"
|
||||||
|
exclude: |
|
||||||
|
**/*.svg
|
||||||
|
**/thirdparty/**
|
||||||
|
**/upstream_utils/**
|
||||||
|
**/generated/**
|
||||||
|
./wpigui/src/main/native/cpp/portable-file-dialogs.*
|
||||||
|
./wpimath/src/main/native/include/wpi/units/base.hpp
|
||||||
|
./wpinet/src/main/native/linux/AvahiClient.*
|
||||||
|
./wpinet/src/main/native/cpp/http_parser.cpp
|
||||||
|
./wpinet/src/main/native/include/wpi/net/http_parser.hpp
|
||||||
|
./wpiutil/src/main/native/include/wpi/util/FastQueue.hpp
|
||||||
|
./wpiutil/src/test/native/cpp/json/**
|
||||||
|
./wpiutil/src/test/native/cpp/llvm/**
|
||||||
|
./wpiutil/src/test/native/cpp/span/**
|
||||||
|
|||||||
@@ -19,21 +19,21 @@ def test_put_double(table1):
|
|||||||
table1.putNumber("double", 42.42)
|
table1.putNumber("double", 42.42)
|
||||||
assert table1.getNumber("double", None) == 42.42
|
assert table1.getNumber("double", None) == 42.42
|
||||||
|
|
||||||
assert table1.getNumber("Non-Existant", 44.44) == 44.44
|
assert table1.getNumber("Non-Existent", 44.44) == 44.44
|
||||||
|
|
||||||
|
|
||||||
def test_put_boolean(table1):
|
def test_put_boolean(table1):
|
||||||
table1.putBoolean("boolean", True)
|
table1.putBoolean("boolean", True)
|
||||||
assert table1.getBoolean("boolean", None) == True
|
assert table1.getBoolean("boolean", None) == True
|
||||||
|
|
||||||
assert table1.getBoolean("Non-Existant", False) == False
|
assert table1.getBoolean("Non-Existent", False) == False
|
||||||
|
|
||||||
|
|
||||||
def test_put_string(table1):
|
def test_put_string(table1):
|
||||||
table1.putString("String", "Test 1")
|
table1.putString("String", "Test 1")
|
||||||
assert table1.getString("String", None) == "Test 1"
|
assert table1.getString("String", None) == "Test 1"
|
||||||
|
|
||||||
assert table1.getString("Non-Existant", "Test 3") == "Test 3"
|
assert table1.getString("Non-Existent", "Test 3") == "Test 3"
|
||||||
|
|
||||||
|
|
||||||
def test_getvalue_overloads(table1):
|
def test_getvalue_overloads(table1):
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</Match>
|
</Match>
|
||||||
<Match>
|
<Match>
|
||||||
<!--
|
<!--
|
||||||
These are false positives where the Random instance is used multiple times in a loop. Futhermore, high randomness is not a
|
These are false positives where the Random instance is used multiple times in a loop. Furthermore, high randomness is not a
|
||||||
high priority because these are tests- In fact, the odometry tests seed the Random instance to guarantee repeatability.
|
high priority because these are tests- In fact, the odometry tests seed the Random instance to guarantee repeatability.
|
||||||
-->
|
-->
|
||||||
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
|
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ int StartRobot() {
|
|||||||
if (!WPI_IsRuntimeValid(&foundMajor, &foundMinor, &expectedMajor,
|
if (!WPI_IsRuntimeValid(&foundMajor, &foundMinor, &expectedMajor,
|
||||||
&expectedMinor, &runtimePath)) {
|
&expectedMinor, &runtimePath)) {
|
||||||
// We could make this error better, however unlike Java, there is only a
|
// We could make this error better, however unlike Java, there is only a
|
||||||
// single scenario that could be occuring. The entirety of VS is too out
|
// single scenario that could be occurring. The entirety of VS is too out
|
||||||
// of date. In most cases the linker should detect this, but not always.
|
// of date. In most cases the linker should detect this, but not always.
|
||||||
fmt::println(
|
fmt::println(
|
||||||
"Your copy of Visual Studio is out of date. Please update it.\n");
|
"Your copy of Visual Studio is out of date. Please update it.\n");
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void destroySmartDashboardData() {
|
|||||||
// is unwinding static objects after interpreter destruction
|
// is unwinding static objects after interpreter destruction
|
||||||
sdData.dec_ref();
|
sdData.dec_ref();
|
||||||
// release our reference to this otherwise the destructor will try to
|
// release our reference to this otherwise the destructor will try to
|
||||||
// delete a non-existant PyObject* after interpreter destruction
|
// delete a non-existent PyObject* after interpreter destruction
|
||||||
sdData.release();
|
sdData.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class Problem implements AutoCloseable {
|
|||||||
* <p>Decision variables have an initial value of zero.
|
* <p>Decision variables have an initial value of zero.
|
||||||
*
|
*
|
||||||
* @param rows Number of matrix rows.
|
* @param rows Number of matrix rows.
|
||||||
* @return A symmetric matrix of decision varaibles in the optimization problem.
|
* @return A symmetric matrix of decision variables in the optimization problem.
|
||||||
*/
|
*/
|
||||||
public VariableMatrix symmetricDecisionVariable(int rows) {
|
public VariableMatrix symmetricDecisionVariable(int rows) {
|
||||||
return new VariableMatrix(rows, rows, ProblemJNI.symmetricDecisionVariable(m_handle, rows));
|
return new VariableMatrix(rows, rows, ProblemJNI.symmetricDecisionVariable(m_handle, rows));
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ final class ProblemJNI extends WPIMathJNI {
|
|||||||
*
|
*
|
||||||
* @param handle Problem handle.
|
* @param handle Problem handle.
|
||||||
* @param rows Number of matrix rows.
|
* @param rows Number of matrix rows.
|
||||||
* @return A symmetric matrix of decision varaibles in the optimization problem.
|
* @return A symmetric matrix of decision variables in the optimization problem.
|
||||||
*/
|
*/
|
||||||
static native long[] symmetricDecisionVariable(long handle, int rows);
|
static native long[] symmetricDecisionVariable(long handle, int rows);
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ class WPILIB_DLLEXPORT PIDController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the error is within the tolerance of the setpoint.
|
* Returns true if the error is within the tolerance of the setpoint.
|
||||||
* The error tolerance defauls to 0.05, and the error derivative tolerance
|
* The error tolerance defaults to 0.05, and the error derivative tolerance
|
||||||
* defaults to ∞.
|
* defaults to ∞.
|
||||||
*
|
*
|
||||||
* This will return false until at least one input value has been computed.
|
* This will return false until at least one input value has been computed.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public final class StructFetcher {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link Struct} for the given class. This does not do compile time checking that the
|
* Returns a {@link Struct} for the given class. This does not do compile time checking that the
|
||||||
* class is a {@link StructSerializable}. Whenever possible it is reccomended to use {@link
|
* class is a {@link StructSerializable}. Whenever possible it is recommended to use {@link
|
||||||
* #fetchStruct(Class)}.
|
* #fetchStruct(Class)}.
|
||||||
*
|
*
|
||||||
* @param clazz The class object to extract the struct from.
|
* @param clazz The class object to extract the struct from.
|
||||||
|
|||||||
Reference in New Issue
Block a user