Upgrade wpiformat and use clang-format's include sorting (#8350)

This PR also uses the newly added -default-branch flag to generate the list of changed files with respect to the correct branch (2027).
This commit is contained in:
Tyler Veness
2025-11-11 18:05:12 -08:00
committed by GitHub
parent a0f4727179
commit 1705b2d61c
321 changed files with 677 additions and 628 deletions

View File

@@ -4,10 +4,9 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <stddef.h> //NOLINT
#include "wpi/hal/DriverStationTypes.h"
#include "wpi/hal/Types.h"
#include "wpi/util/Synchronization.h"

View File

@@ -9,9 +9,7 @@
#ifdef __cplusplus
#include <cstddef>
#else
#include <stddef.h> // NOLINT(build/include_order)
#include <stddef.h>
#endif
#include "wpi/hal/Types.h"

View File

@@ -10,7 +10,7 @@
#include <vector>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#pragma comment(lib, "Winmm.lib")
#pragma comment(lib, "ntdll.lib")
extern "C" NTSYSAPI NTSTATUS NTAPI NtSetTimerResolution(

View File

@@ -2,7 +2,7 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/SimDeviceData.h" // NOLINT(build/include_order)
#include "wpi/hal/simulation/SimDeviceData.h"
#include <algorithm>
#include <memory>

View File

@@ -2,10 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <gtest/gtest.h>
#include "wpi/hal/HAL.h"
#include <gtest/gtest.h>
namespace wpi::hal {
TEST(HALTest, RuntimeType) {
EXPECT_EQ(HAL_RuntimeType::HAL_Runtime_Simulation, HAL_GetRuntimeType());

View File

@@ -2,6 +2,8 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/AnalogInData.h"
#include <string>
#include <gtest/gtest.h>
@@ -9,7 +11,6 @@
#include "wpi/hal/AnalogInput.h"
#include "wpi/hal/HAL.h"
#include "wpi/hal/handles/HandlesInternal.h"
#include "wpi/hal/simulation/AnalogInData.h"
namespace wpi::hal {

View File

@@ -2,6 +2,8 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/DIOData.h"
#include <string>
#include <gtest/gtest.h>
@@ -9,7 +11,6 @@
#include "wpi/hal/DIO.h"
#include "wpi/hal/HAL.h"
#include "wpi/hal/handles/HandlesInternal.h"
#include "wpi/hal/simulation/DIOData.h"
namespace wpi::hal {

View File

@@ -2,13 +2,14 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/DriverStationData.h"
#include <cstring>
#include <string>
#include <gtest/gtest.h>
#include "wpi/hal/HAL.h"
#include "wpi/hal/simulation/DriverStationData.h"
#include "wpi/util/StringExtras.hpp"
namespace wpi::hal {

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/I2CData.h"
#include <string>
#include <gtest/gtest.h>
#include "wpi/hal/I2C.h"
#include "wpi/hal/simulation/I2CData.h"
namespace wpi::hal {

View File

@@ -2,6 +2,8 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/PWMData.h"
#include <string>
#include <gtest/gtest.h>
@@ -9,7 +11,6 @@
#include "wpi/hal/HAL.h"
#include "wpi/hal/PWM.h"
#include "wpi/hal/handles/HandlesInternal.h"
#include "wpi/hal/simulation/PWMData.h"
namespace wpi::hal {

View File

@@ -2,10 +2,11 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/simulation/SimDeviceData.h"
#include <gtest/gtest.h>
#include "wpi/hal/SimDevice.h"
#include "wpi/hal/simulation/SimDeviceData.h"
namespace wpi::hal {