diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 7075ac11cb..05d6484f50 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -36,7 +36,7 @@ jobs: - name: Install wpiformat run: | python -m venv ${{ runner.temp }}/wpiformat - ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34 + ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36 - name: Run run: ${{ runner.temp }}/wpiformat/bin/wpiformat - name: Check output @@ -78,7 +78,7 @@ jobs: - name: Install wpiformat run: | python -m venv ${{ runner.temp }}/wpiformat - ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34 + ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36 - name: Create compile_commands.json run: | ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio diff --git a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp index 3686d3affd..f5e4cf3e44 100644 --- a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp +++ b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp @@ -186,7 +186,7 @@ extern "C" { #if defined(WIN32) || defined(_WIN32) __declspec(dllexport) #endif - int HALSIM_InitExtension(void) { +int HALSIM_InitExtension(void) { static bool once = false; if (once) { diff --git a/simulation/halsim_gui/src/main/native/cpp/main.cpp b/simulation/halsim_gui/src/main/native/cpp/main.cpp index 2df10c84f0..9fba6a555b 100644 --- a/simulation/halsim_gui/src/main/native/cpp/main.cpp +++ b/simulation/halsim_gui/src/main/native/cpp/main.cpp @@ -45,7 +45,7 @@ extern "C" { #if defined(WIN32) || defined(_WIN32) __declspec(dllexport) #endif - int HALSIM_InitExtension(void) { +int HALSIM_InitExtension(void) { std::puts("Simulator GUI Initializing."); gui::CreateContext(); diff --git a/simulation/halsim_gui/src/main/native/include/HALDataSource.h b/simulation/halsim_gui/src/main/native/include/HALDataSource.h index 295b3f8ba5..c04f3589b3 100644 --- a/simulation/halsim_gui/src/main/native/include/HALDataSource.h +++ b/simulation/halsim_gui/src/main/native/include/HALDataSource.h @@ -57,13 +57,9 @@ HALSIM_Cancel##cbname##Callback(m_index, m_callback); \ } \ \ - int32_t GetIndex() const { \ - return m_index; \ - } \ + int32_t GetIndex() const { return m_index; } \ \ - int GetChannel() const { \ - return m_channel; \ - } \ + int GetChannel() const { return m_channel; } \ \ private: \ static void CallbackFunc(const char*, void* param, \ @@ -100,13 +96,9 @@ HALSIM_Cancel##cbname##Callback(m_index, m_channel, m_callback); \ } \ \ - int32_t GetIndex() const { \ - return m_index; \ - } \ + int32_t GetIndex() const { return m_index; } \ \ - int32_t GetChannel() const { \ - return m_channel; \ - } \ + int32_t GetChannel() const { return m_channel; } \ \ private: \ static void CallbackFunc(const char*, void* param, \ diff --git a/simulation/halsim_ws_client/src/main/native/cpp/main.cpp b/simulation/halsim_ws_client/src/main/native/cpp/main.cpp index 8e2e2fa569..f46fad6c04 100644 --- a/simulation/halsim_ws_client/src/main/native/cpp/main.cpp +++ b/simulation/halsim_ws_client/src/main/native/cpp/main.cpp @@ -18,7 +18,7 @@ extern "C" { __declspec(dllexport) #endif - int HALSIM_InitExtension(void) { +int HALSIM_InitExtension(void) { std::puts("HALSim WS Client Extension Initializing"); HAL_OnShutdown(nullptr, [](void*) { gClient.reset(); }); diff --git a/simulation/halsim_ws_server/src/main/native/cpp/main.cpp b/simulation/halsim_ws_server/src/main/native/cpp/main.cpp index 1ee0ae8bba..ef9f8a2081 100644 --- a/simulation/halsim_ws_server/src/main/native/cpp/main.cpp +++ b/simulation/halsim_ws_server/src/main/native/cpp/main.cpp @@ -18,7 +18,7 @@ extern "C" { #if defined(WIN32) || defined(_WIN32) __declspec(dllexport) #endif - int HALSIM_InitExtension(void) { +int HALSIM_InitExtension(void) { std::puts("Websocket WS Server Initializing."); HAL_OnShutdown(nullptr, [](void*) { gServer.reset(); }); diff --git a/simulation/halsim_xrp/src/main/native/cpp/main.cpp b/simulation/halsim_xrp/src/main/native/cpp/main.cpp index a399c592a0..4b338f4453 100644 --- a/simulation/halsim_xrp/src/main/native/cpp/main.cpp +++ b/simulation/halsim_xrp/src/main/native/cpp/main.cpp @@ -25,7 +25,7 @@ extern "C" { __declspec(dllexport) #endif - int HALSIM_InitExtension(void) { +int HALSIM_InitExtension(void) { std::puts("HALSim XRP Extension Initializing"); HAL_OnShutdown(nullptr, [](void*) { gClient.reset(); }); diff --git a/sysid/src/main/native/cpp/analysis/FeedforwardAnalysis.cpp b/sysid/src/main/native/cpp/analysis/FeedforwardAnalysis.cpp index 3f517d9da2..e0ece513ed 100644 --- a/sysid/src/main/native/cpp/analysis/FeedforwardAnalysis.cpp +++ b/sysid/src/main/native/cpp/analysis/FeedforwardAnalysis.cpp @@ -251,17 +251,17 @@ OLSResult CalculateFeedforwardGains(const Storage& data, if (type == analysis::kArm) { // dx/dt = -Kv/Ka x + 1/Ka u - Ks/Ka sgn(x) - // - Kg/Ka cos(offset) cos(angle) NOLINT - // + Kg/Ka sin(offset) sin(angle) NOLINT - // dx/dt = αx + βu + γ sgn(x) + δ cos(angle) + ε sin(angle) NOLINT + // - Kg/Ka cos(offset) cos(angle) + // + Kg/Ka sin(offset) sin(angle) + // dx/dt = αx + βu + γ sgn(x) + δ cos(angle) + ε sin(angle) // δ = -Kg/Ka cos(offset) // ε = Kg/Ka sin(offset) double δ = ols.coeffs[3]; double ε = ols.coeffs[4]; - // Kg = hypot(δ, ε)/β NOLINT - // offset = atan2(ε, -δ) NOLINT + // Kg = hypot(δ, ε)/β + // offset = atan2(ε, -δ) gains.emplace_back(std::hypot(δ, ε) / β); gains.emplace_back(std::atan2(ε, -δ)); } diff --git a/upstream_utils/sleipnir.py b/upstream_utils/sleipnir.py index 8600d0be13..a83520464b 100755 --- a/upstream_utils/sleipnir.py +++ b/upstream_utils/sleipnir.py @@ -19,10 +19,7 @@ def copy_upstream_src(wpilib_root: Path): # Copy Sleipnir files into allwpilib walk_cwd_and_copy_if( lambda dp, f: (has_prefix(dp, Path("include")) or has_prefix(dp, Path("src"))) - or f == ".clang-format" - or f == ".clang-tidy" - or f == ".styleguide" - or f == ".styleguide-license", + and f not in [".styleguide", ".styleguide-license"], wpimath / "src/main/native/thirdparty/sleipnir", ) diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h index fb54d3bc09..e7c284e6e4 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h @@ -25,8 +25,7 @@ namespace frc2 { * std::unique_ptr, use CommandPtr::Unwrap to convert. * CommandPtr::UnwrapVector does the same for vectors. */ -class [[nodiscard]] -CommandPtr final { +class [[nodiscard]] CommandPtr final { public: explicit CommandPtr(std::unique_ptr&& command); diff --git a/wpimath/.styleguide b/wpimath/.styleguide index 91d68ae2b2..5ce1237835 100644 --- a/wpimath/.styleguide +++ b/wpimath/.styleguide @@ -19,8 +19,6 @@ generatedFileExclude { src/main/native/include/unsupported/ src/main/native/thirdparty/ src/test/native/cpp/UnitsTest\.cpp$ - src/test/native/cpp/drake/ - src/test/native/include/drake/ src/generated/main/java/edu/wpi/first/math/proto src/generated/main/native/cpp } @@ -41,6 +39,7 @@ includeOtherLibs { ^gcem/ ^google/ ^gtest/ + ^sleipnir/ ^unsupported/ ^wpi/ } diff --git a/wpimath/src/main/native/include/frc/StateSpaceUtil.h b/wpimath/src/main/native/include/frc/StateSpaceUtil.h index 6c58485d45..b04aea48ce 100644 --- a/wpimath/src/main/native/include/frc/StateSpaceUtil.h +++ b/wpimath/src/main/native/include/frc/StateSpaceUtil.h @@ -260,7 +260,7 @@ WPILIB_DLLEXPORT constexpr Eigen::Vector3d PoseTo3dVector(const Pose2d& pose) { } /** - * Converts a Pose2d into a vector of [x, y, std::cos(theta), std::sin(theta)]. + * Converts a Pose2d into a vector of [x, y, cos(theta), sin(theta)]. * * @param pose The pose that is being represented. * diff --git a/wpimath/src/main/native/include/frc/geometry/Ellipse2d.h b/wpimath/src/main/native/include/frc/geometry/Ellipse2d.h index 629faf5922..1c3a8382af 100644 --- a/wpimath/src/main/native/include/frc/geometry/Ellipse2d.h +++ b/wpimath/src/main/native/include/frc/geometry/Ellipse2d.h @@ -91,7 +91,7 @@ class WPILIB_DLLEXPORT Ellipse2d { auto a = units::math::max(m_xSemiAxis, m_ySemiAxis); // Minor semi-axis - auto b = units::math::min(m_xSemiAxis, m_ySemiAxis); // NOLINT + auto b = units::math::min(m_xSemiAxis, m_ySemiAxis); auto c = units::math::sqrt(a * a - b * b); @@ -203,7 +203,9 @@ class WPILIB_DLLEXPORT Ellipse2d { auto x = rotPoint.X() - m_center.X(); auto y = rotPoint.Y() - m_center.Y(); + // NOLINTNEXTLINE (bugprone-integer-division) return (x * x) / (m_xSemiAxis * m_xSemiAxis) + + // NOLINTNEXTLINE (bugprone-integer-division) (y * y) / (m_ySemiAxis * m_ySemiAxis); } }; diff --git a/wpimath/src/main/native/include/frc/geometry/Pose3d.h b/wpimath/src/main/native/include/frc/geometry/Pose3d.h index e2ec7c4609..17aac42648 100644 --- a/wpimath/src/main/native/include/frc/geometry/Pose3d.h +++ b/wpimath/src/main/native/include/frc/geometry/Pose3d.h @@ -432,8 +432,8 @@ constexpr Pose3d Pose3d::Exp(const Twist3d& twist) const { B = 1 / 2.0 - thetaSq / 24 + thetaSq * thetaSq / 720; C = 1 / 6.0 - thetaSq / 120 + thetaSq * thetaSq / 5040; } else { - // A = std::sin(θ)/θ - // B = (1 - std::cos(θ)) / θ² + // A = sin(θ)/θ + // B = (1 - cos(θ)) / θ² // C = (1 - A) / θ² A = gcem::sin(theta) / theta; B = (1 - gcem::cos(theta)) / thetaSq; @@ -491,8 +491,8 @@ constexpr Twist3d Pose3d::Log(const Pose3d& end) const { // https://www.wolframalpha.com/input?i2d=true&i=series+expansion+of+Divide%5B1-Divide%5BDivide%5Bsin%5C%2840%29x%5C%2841%29%2Cx%5D%2C2Divide%5B1-cos%5C%2840%29x%5C%2841%29%2CPower%5Bx%2C2%5D%5D%5D%2CPower%5Bx%2C2%5D%5D+at+x%3D0 C = 1 / 12.0 + thetaSq / 720 + thetaSq * thetaSq / 30240; } else { - // A = std::sin(θ)/θ - // B = (1 - std::cos(θ)) / θ² + // A = sin(θ)/θ + // B = (1 - cos(θ)) / θ² // C = (1 - A/(2*B)) / θ² double A = gcem::sin(theta) / theta; double B = (1 - gcem::cos(theta)) / thetaSq; diff --git a/wpimath/src/main/native/include/frc/geometry/Quaternion.h b/wpimath/src/main/native/include/frc/geometry/Quaternion.h index 65c6a8265e..09d21e38f2 100644 --- a/wpimath/src/main/native/include/frc/geometry/Quaternion.h +++ b/wpimath/src/main/native/include/frc/geometry/Quaternion.h @@ -296,8 +296,8 @@ class WPILIB_DLLEXPORT Quaternion { // 𝑣⃗ = θ * v̂ // v̂ = 𝑣⃗ / θ - // 𝑞 = std::cos(θ/2) + std::sin(θ/2) * v̂ - // 𝑞 = std::cos(θ/2) + std::sin(θ/2) / θ * 𝑣⃗ + // 𝑞 = cos(θ/2) + sin(θ/2) * v̂ + // 𝑞 = cos(θ/2) + sin(θ/2) / θ * 𝑣⃗ double theta = gcem::hypot(rvec(0), rvec(1), rvec(2)); double cos = gcem::cos(theta / 2); diff --git a/wpimath/src/main/native/thirdparty/sleipnir/.clang-format b/wpimath/src/main/native/thirdparty/sleipnir/.clang-format deleted file mode 100644 index 5e5e1773c3..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/.clang-format +++ /dev/null @@ -1,249 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -AccessModifierOffset: -1 -AlignAfterOpenBracket: Align -AlignArrayOfStructures: None -AlignConsecutiveAssignments: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: true -AlignConsecutiveBitFields: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveDeclarations: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveMacros: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveShortCaseStatements: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCaseColons: false -AlignEscapedNewlines: Left -AlignOperands: Align -AlignTrailingComments: - Kind: Always - OverEmptyLines: 0 -AllowAllArgumentsOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: Never -AllowShortCaseLabelsOnASingleLine: false -AllowShortEnumsOnASingleLine: true -AllowShortFunctionsOnASingleLine: Inline -AllowShortIfStatementsOnASingleLine: Never -AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: true -BinPackParameters: true -BitFieldColonSpacing: Both -BraceWrapping: - AfterCaseLabel: false - AfterClass: false - AfterControlStatement: Never - AfterEnum: false - AfterExternBlock: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - BeforeCatch: false - BeforeElse: false - BeforeLambdaBody: false - BeforeWhile: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakAfterAttributes: Always -BreakAfterJavaFieldAnnotations: false -BreakArrays: true -BreakBeforeBinaryOperators: None -BreakBeforeConceptDeclarations: Always -BreakBeforeBraces: Attach -BreakBeforeInlineASMColon: OnlyMultiline -BreakBeforeTernaryOperators: true -BreakConstructorInitializers: BeforeColon -BreakInheritanceList: BeforeColon -BreakStringLiterals: true -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -EmptyLineAfterAccessModifier: Never -EmptyLineBeforeAccessModifier: LogicalBlock -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: true -IncludeBlocks: Regroup -IncludeCategories: - - Regex: '^' - Priority: 2 - SortPriority: 0 - CaseSensitive: false - - Regex: '^<.*\.h>' - Priority: 1 - SortPriority: 0 - CaseSensitive: false - - Regex: '^<.*' - Priority: 2 - SortPriority: 0 - CaseSensitive: false - - Regex: '.*' - Priority: 3 - SortPriority: 0 - CaseSensitive: false -IncludeIsMainRegex: '([-_](test|unittest))?$' -IncludeIsMainSourceRegex: '' -IndentAccessModifiers: false -IndentCaseBlocks: false -IndentCaseLabels: true -IndentExternBlock: AfterExternBlock -IndentGotoLabels: true -IndentPPDirectives: None -IndentRequiresClause: true -IndentWidth: 2 -IndentWrappedFunctionNames: false -InsertBraces: false -InsertNewlineAtEOF: false -InsertTrailingCommas: None -IntegerLiteralSeparator: - Binary: 0 - BinaryMinDigits: 0 - Decimal: 0 - DecimalMinDigits: 0 - Hex: 0 - HexMinDigits: 0 -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: false -KeepEmptyLinesAtEOF: false -LambdaBodyIndentation: Signature -LineEnding: DeriveLF -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBinPackProtocolList: Never -ObjCBlockIndentWidth: 2 -ObjCBreakBeforeNestedBlockParam: true -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: true -PackConstructorInitializers: NextLine -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakOpenParenthesis: 0 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 -PenaltyIndentedWhitespace: 0 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Left -PPIndentWidth: -1 -QualifierAlignment: Leave -RawStringFormats: - - Language: Cpp - Delimiters: - - cc - - CC - - cpp - - Cpp - - CPP - - 'c++' - - 'C++' - CanonicalDelimiter: '' - BasedOnStyle: google - - Language: TextProto - Delimiters: - - pb - - PB - - proto - - PROTO - EnclosingFunctions: - - EqualsProto - - EquivToProto - - PARSE_PARTIAL_TEXT_PROTO - - PARSE_TEST_PROTO - - PARSE_TEXT_PROTO - - ParseTextOrDie - - ParseTextProtoOrDie - - ParseTestProto - - ParsePartialTestProto - CanonicalDelimiter: pb - BasedOnStyle: google -ReferenceAlignment: Pointer -ReflowComments: true -RemoveBracesLLVM: false -RemoveParentheses: Leave -RemoveSemicolon: false -RequiresClausePosition: OwnLine -RequiresExpressionIndentation: OuterScope -SeparateDefinitionBlocks: Leave -ShortNamespaceLines: 1 -SortIncludes: false -SortJavaStaticImport: Before -SortUsingDeclarations: LexicographicNumeric -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true -SpaceAroundPointerQualifiers: Default -SpaceBeforeAssignmentOperators: true -SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeJsonColon: false -SpaceBeforeParens: ControlStatements -SpaceBeforeParensOptions: - AfterControlStatements: true - AfterForeachMacros: true - AfterFunctionDefinitionName: false - AfterFunctionDeclarationName: false - AfterIfMacros: true - AfterOverloadedOperator: false - AfterRequiresInClause: false - AfterRequiresInExpression: false - BeforeNonEmptyParentheses: false -SpaceBeforeRangeBasedForLoopColon: true -SpaceBeforeSquareBrackets: false -SpaceInEmptyBlock: false -SpacesBeforeTrailingComments: 2 -SpacesInAngles: Never -SpacesInContainerLiterals: true -SpacesInLineCommentPrefix: - Minimum: 1 - Maximum: -1 -SpacesInParens: Never -SpacesInParensOptions: - InCStyleCasts: false - InConditionalStatements: false - InEmptyParentheses: false - Other: false -SpacesInSquareBrackets: false -Standard: c++20 -TabWidth: 8 -UseTab: Never -... diff --git a/wpimath/src/main/native/thirdparty/sleipnir/.clang-tidy b/wpimath/src/main/native/thirdparty/sleipnir/.clang-tidy deleted file mode 100644 index cfb2b12f2a..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/.clang-tidy +++ /dev/null @@ -1,74 +0,0 @@ -Checks: - 'bugprone-assert-side-effect, - bugprone-bool-pointer-implicit-conversion, - bugprone-copy-constructor-init, - bugprone-dangling-handle, - bugprone-dynamic-static-initializers, - bugprone-forward-declaration-namespace, - bugprone-forwarding-reference-overload, - bugprone-inaccurate-erase, - bugprone-incorrect-roundings, - bugprone-integer-division, - bugprone-lambda-function-name, - bugprone-misplaced-operator-in-strlen-in-alloc, - bugprone-misplaced-widening-cast, - bugprone-move-forwarding-reference, - bugprone-multiple-statement-macro, - bugprone-parent-virtual-call, - bugprone-posix-return, - bugprone-sizeof-container, - bugprone-sizeof-expression, - bugprone-spuriously-wake-up-functions, - bugprone-string-constructor, - bugprone-string-integer-assignment, - bugprone-string-literal-with-embedded-nul, - bugprone-suspicious-enum-usage, - bugprone-suspicious-include, - bugprone-suspicious-memset-usage, - bugprone-suspicious-missing-comma, - bugprone-suspicious-semicolon, - bugprone-suspicious-string-compare, - bugprone-throw-keyword-missing, - bugprone-too-small-loop-variable, - bugprone-undefined-memory-manipulation, - bugprone-undelegated-constructor, - bugprone-unhandled-self-assignment, - bugprone-unused-raii, - bugprone-virtual-near-miss, - cert-err52-cpp, - cert-err60-cpp, - cert-mem57-cpp, - cert-oop57-cpp, - cert-oop58-cpp, - clang-diagnostic-*, - -clang-diagnostic-deprecated-declarations, - -clang-diagnostic-#warnings, - -clang-diagnostic-pedantic, - clang-analyzer-*, - -clang-analyzer-core.uninitialized.UndefReturn, - -clang-analyzer-optin.cplusplus.UninitializedObject, - -clang-analyzer-optin.portability.UnixAPI, - -clang-analyzer-unix.Malloc, - -cppcoreguidelines-slicing, - google-build-namespaces, - google-explicit-constructor, - google-global-names-in-headers, - google-readability-avoid-underscore-in-googletest-name, - google-readability-casting, - google-runtime-operator, - misc-definitions-in-headers, - misc-misplaced-const, - misc-new-delete-overloads, - misc-non-copyable-objects, - modernize-avoid-bind, - modernize-concat-nested-namespaces, - modernize-make-shared, - modernize-make-unique, - modernize-pass-by-value, - modernize-use-default-member-init, - modernize-use-noexcept, - modernize-use-nullptr, - modernize-use-override, - modernize-use-using, - readability-braces-around-statements' -FormatStyle: file diff --git a/wpimath/src/main/native/thirdparty/sleipnir/.styleguide b/wpimath/src/main/native/thirdparty/sleipnir/.styleguide deleted file mode 100644 index 054f5eb80e..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/.styleguide +++ /dev/null @@ -1,23 +0,0 @@ -cppHeaderFileInclude { - \.hpp$ -} - -cppSrcFileInclude { - \.cpp$ -} - -modifiableFileExclude { - \.patch$ - \.png$ - \.svg$ - jormungandr/cpp/docstrings\.hpp$ - jormungandr/py\.typed$ -} - -includeOtherLibs { - ^Eigen/ - ^catch2/ - ^gch/ - ^nanobind/ - ^sleipnir/ -} diff --git a/wpimath/src/main/native/thirdparty/sleipnir/.styleguide-license b/wpimath/src/main/native/thirdparty/sleipnir/.styleguide-license deleted file mode 100644 index d664772a55..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/.styleguide-license +++ /dev/null @@ -1 +0,0 @@ -// Copyright (c) Sleipnir contributors diff --git a/wpimath/src/main/native/thirdparty/sleipnir/include/.styleguide b/wpimath/src/main/native/thirdparty/sleipnir/include/.styleguide deleted file mode 100644 index 03938557c2..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/include/.styleguide +++ /dev/null @@ -1,14 +0,0 @@ -cppHeaderFileInclude { - \.hpp$ -} - -cppSrcFileInclude { - \.cpp$ -} - -includeOtherLibs { - ^Eigen/ - ^fmt/ - ^gch/ - ^wpi/ -} diff --git a/wpimath/src/main/native/thirdparty/sleipnir/src/.styleguide b/wpimath/src/main/native/thirdparty/sleipnir/src/.styleguide deleted file mode 100644 index 4f4c762040..0000000000 --- a/wpimath/src/main/native/thirdparty/sleipnir/src/.styleguide +++ /dev/null @@ -1,13 +0,0 @@ -cppHeaderFileInclude { - \.hpp$ -} - -cppSrcFileInclude { - \.cpp$ -} - -includeOtherLibs { - ^Eigen/ - ^fmt/ - ^gch/ -} diff --git a/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp b/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp index 919552534d..c69e3f8f50 100644 --- a/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp +++ b/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp @@ -192,11 +192,11 @@ TEST(LinearFilterOutputTest, CentralFiniteDifference) { AssertCentralResults<1, 3>( [](double x) { - // f(x) = std::sin(x) + // f(x) = sin(x) return std::sin(x); }, [](double x) { - // df/dx = std::cos(x) + // df/dx = cos(x) return std::cos(x); }, h, -20.0, 20.0); @@ -225,11 +225,11 @@ TEST(LinearFilterOutputTest, CentralFiniteDifference) { AssertCentralResults<2, 5>( [](double x) { - // f(x) = std::sin(x) + // f(x) = sin(x) return std::sin(x); }, [](double x) { - // d²f/dx² = -std::sin(x) + // d²f/dx² = -sin(x) return -std::sin(x); }, h, -20.0, 20.0); @@ -265,11 +265,11 @@ TEST(LinearFilterOutputTest, BackwardFiniteDifference) { AssertBackwardResults<1, 2>( [](double x) { - // f(x) = std::sin(x) + // f(x) = sin(x) return std::sin(x); }, [](double x) { - // df/dx = std::cos(x) + // df/dx = cos(x) return std::cos(x); }, h, -20.0, 20.0); @@ -298,11 +298,11 @@ TEST(LinearFilterOutputTest, BackwardFiniteDifference) { AssertBackwardResults<2, 4>( [](double x) { - // f(x) = std::sin(x) + // f(x) = sin(x) return std::sin(x); }, [](double x) { - // d²f/dx² = -std::sin(x) + // d²f/dx² = -sin(x) return -std::sin(x); }, h, -20.0, 20.0); diff --git a/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h b/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h index 739a95ee08..8b3f4b1b21 100644 --- a/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h +++ b/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h @@ -39,8 +39,7 @@ class SendableHelper { // See https://bugzilla.mozilla.org/show_bug.cgi?id=1442819 __attribute__((no_sanitize("vptr"))) #endif - constexpr SendableHelper& - operator=(SendableHelper&& rhs) { + constexpr SendableHelper& operator=(SendableHelper&& rhs) { if (!std::is_constant_evaluated()) { // it is safe to call Move() multiple times with the same rhs SendableRegistry::Move(static_cast(this),