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

@@ -33,12 +33,3 @@ includeGuardRoots {
repoRootNameOverride {
cscore
}
includeOtherLibs {
^fmt/
^gtest/
^opencv2/
^imgui
^support/
^tcpsockets/
}

View File

@@ -2,7 +2,9 @@
// 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/cs/cscore_c.h" // NOLINT(build/include_order)
// clang-format off
#include "wpi/cs/cscore_c.h"
// clang-format on
#include "c_util.hpp"
#include "wpi/cs/cscore_cpp.hpp"

View File

@@ -9,14 +9,13 @@
#include <fmt/format.h>
#define WPI_RAWFRAME_JNI
#include "org_wpilib_vision_camera_CameraServerJNI.h"
#include "wpi/cs/cscore_raw.h"
#include "wpi/cs/cscore_runloop.hpp"
#include "wpi/util/RawFrame.h"
#include "wpi/util/SmallString.hpp"
#include "wpi/util/jni_util.hpp"
#include "wpi/cs/cscore_raw.h"
#include "wpi/cs/cscore_runloop.hpp"
#include "org_wpilib_vision_camera_CameraServerJNI.h"
namespace cv {
class Mat;
} // namespace cv

View File

@@ -2,7 +2,9 @@
// 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/cs/cscore_cpp.hpp" // NOLINT(build/include_order)
// clang-format off
#include "wpi/cs/cscore_cpp.hpp"
// clang-format on
#include <arpa/inet.h>
#include <ifaddrs.h>

View File

@@ -2,13 +2,12 @@
// 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 <windows.h>
#include <mfapi.h>
#include <mfidl.h>
#include <shlwapi.h>
#include <windowsx.h>
#include <Windows.h>
#include "UsbCameraImpl.hpp"
// https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_msmf.cpp

View File

@@ -4,17 +4,12 @@
#include "NetworkListener.hpp"
#include <winsock2.h> // NOLINT(build/include_order)
#include <windows.h> // NOLINT(build/include_order)
#include <ws2def.h> // NOLINT(build/include_order)
#include <ws2ipdef.h> // NOLINT(build/include_order)
#include <iphlpapi.h> // NOLINT(build/include_order)
#include <netioapi.h> // NOLINT(build/include_order)
#include <winsock2.h>
#include <windows.h>
#include <ws2def.h>
#include <ws2ipdef.h>
#include <iphlpapi.h>
#include <netioapi.h>
#include "Instance.hpp"
#include "Log.hpp"

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 <uv.h>
#include <ws2tcpip.h>
#include <string>
#include <vector>
#include <uv.h>
#include "wpi/cs/cscore_cpp.hpp"
#pragma comment(lib, "Ws2_32.lib")

View File

@@ -5,6 +5,9 @@
#define _WINSOCKAPI_
#include "UsbCameraImpl.hpp"
#include <windows.h>
#include <dbt.h>
#include <dshow.h>
#include <ks.h>
#include <ksmedia.h>
#include <mfapi.h>
@@ -19,10 +22,6 @@
#include <utility>
#include <vector>
#include <Dbt.h>
#include <Dshow.h>
#include <Windows.h>
#include "COMCreators.hpp"
#include "ComPtr.hpp"
#include "Handle.hpp"

View File

@@ -5,14 +5,14 @@
#ifndef CSCORE_USBCAMERAIMPL_HPP_
#define CSCORE_USBCAMERAIMPL_HPP_
#include <windows.h>
#include <dbt.h>
#include <ks.h>
#include <ksmedia.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <ks.h> // NOLINT(build/include_order)
#include <ksmedia.h> // NOLINT(build/include_order)
#include <atomic>
#include <memory>
#include <string>
@@ -21,8 +21,6 @@
#include <utility>
#include <vector>
#include <Dbt.h>
#include "COMCreators.hpp"
#include "ComPtr.hpp"
#include "SourceImpl.hpp"

View File

@@ -4,13 +4,14 @@
#include "UsbCameraListener.hpp"
#include "Notifier.hpp"
#include "WindowsMessagePump.hpp"
#include <dbt.h> // NOLINT(build/include_order)
#include <windows.h>
#include <dbt.h>
#include <memory>
#include "Notifier.hpp"
#include "WindowsMessagePump.hpp"
#define IDT_TIMER1 1001
using namespace wpi::cs;

View File

@@ -4,6 +4,7 @@
#pragma once
#include <dshow.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
@@ -11,8 +12,6 @@
#include <memory>
#include <string_view>
#include <Dshow.h>
#include "PropertyImpl.hpp"
#include "wpi/util/mutex.hpp"

View File

@@ -4,17 +4,16 @@
#include "WindowsMessagePump.hpp"
#include <windows.h>
#include <dbt.h>
#include <ks.h>
#include <ksmedia.h>
#include <mfapi.h>
#include <mfidl.h>
#include <windows.h>
#include <windowsx.h>
#include <memory>
#include <Dbt.h>
#pragma comment(lib, "Mfplat.lib")
#pragma comment(lib, "Mf.lib")
#pragma comment(lib, "mfuuid.lib")