Shorten wpiformat config (#8427)

This commit is contained in:
Tyler Veness
2025-11-27 17:30:06 -08:00
committed by GitHub
parent a802855e0c
commit b482fa02df
8 changed files with 30 additions and 88 deletions

View File

@@ -134,7 +134,7 @@ IncludeCategories:
Priority: 1 Priority: 1
SortPriority: 4 SortPriority: 4
# Windows system headers # Windows system headers
- Regex: '^<(dbghelp\.h|dbt\.h|delayimp\.h|dshow\.h|io\.h|iphlpapi\.h|ks\.h|ksmedia\.h|memoryapi\.h|mfapi\.h|mferror\.h|mfidl\.h|mfreadwrite\.h|netioapi\.h|shellapi\.h|shlwapi\.h|sysinfoapi\.h|windns\.h|windowsx\.h|ws2tcpip\.h)>' - Regex: '^<(dbghelp\.h|dbt\.h|delayimp\.h|dshow\.h|io\.h|iphlpapi\.h|ks\.h|ksmedia\.h|memoryapi\.h|mfapi\.h|mferror\.h|mfidl\.h|mfreadwrite\.h|netioapi\.h|ntstatus\.h|shellapi\.h|shlobj\.h|shlwapi\.h|sysinfoapi\.h|windns\.h|windowsx\.h|winternl\.h|ws2tcpip\.h)>'
Priority: 1 Priority: 1
SortPriority: 5 SortPriority: 5
# C++ standard library headers (lowercase and underscores with no .h suffix) # C++ standard library headers (lowercase and underscores with no .h suffix)

View File

@@ -36,7 +36,7 @@ jobs:
- name: Install wpiformat - name: Install wpiformat
run: | run: |
python -m venv ${{ runner.temp }}/wpiformat python -m venv ${{ runner.temp }}/wpiformat
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.77 ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.78
- name: Run - name: Run
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027 run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027
- name: Check output - name: Check output
@@ -78,7 +78,7 @@ jobs:
- name: Install wpiformat - name: Install wpiformat
run: | run: |
python -m venv ${{ runner.temp }}/wpiformat python -m venv ${{ runner.temp }}/wpiformat
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.77 ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.78
- name: Create compile_commands.json - name: Create compile_commands.json
run: | run: |
./gradlew generateCompileCommands -Ptoolchain-optional-roboRio ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio

View File

@@ -9,95 +9,37 @@ cppHeaderFileInclude {
} }
generatedFileExclude { generatedFileExclude {
\.jinja$ assets/
apriltag/src/test/resources/
docs/theme\.css$ docs/theme\.css$
fields/src/main/native/resources/
generated/ generated/
glass/src/app/native/mac/glass\.icns$
glass/src/app/native/resources/
glass/src/app/native/win/glass\.ico$
hal/src/main/native/athena/ctre/
hal/src/main/native/athena/frccansae/
hal/src/main/native/athena/rev/
hal/src/main/native/athena/visa/
hal/src/main/native/include/ctre/
hal/src/main/native/include/wpi/hal/UsageReporting\.h$
hal/src/main/native/systemcore/ctre/
hal/src/main/native/systemcore/rev/ hal/src/main/native/systemcore/rev/
ntcore/doc/ python/
tools/datalogtool/src/main/native/mac/datalogtool\.icns$ resources/
tools/datalogtool/src/main/native/resources/ thirdparty/
tools/datalogtool/src/main/native/win/datalogtool\.ico$
tools/outlineviewer/src/main/native/mac/ov\.icns$
tools/outlineviewer/src/main/native/resources/
tools/outlineviewer/src/main/native/win/outlineviewer\.ico$
tools/sysid/src/main/native/mac/sysid\.icns$
tools/sysid/src/main/native/resources/
tools/sysid/src/main/native/win/sysid\.ico$
tools/wpical/src/main/native/assets/
tools/wpical/src/main/native/mac/wpical\.icns$
tools/wpical/src/main/native/resources/
tools/wpical/src/main/native/thirdparty/
tools/wpical/src/main/native/win/wpical\.ico$
wpigui/src/main/native/cpp/portable-file-dialogs\.cpp$ wpigui/src/main/native/cpp/portable-file-dialogs\.cpp$
wpigui/src/main/native/include/wpi/gui/portable-file-dialogs\.h$ wpigui/src/main/native/include/wpi/gui/portable-file-dialogs\.h$
wpimath/src/main/native/include/wpi/units/base\.hpp$ wpimath/src/main/native/include/wpi/units/base\.hpp$
wpimath/src/main/native/include/wpi/units/units\.hpp$
wpimath/src/main/native/thirdparty/
wpimath/src/test/native/cpp/UnitsTest\.cpp$
wpinet/src/main/native/cpp/http_parser\.cpp$ wpinet/src/main/native/cpp/http_parser\.cpp$
wpinet/src/main/native/include/wpi/net/http_parser\.hpp$ wpinet/src/main/native/include/wpi/net/http_parser\.hpp$
wpinet/src/main/native/linux/AvahiClient\.cpp$
wpinet/src/main/native/linux/AvahiClient\.hpp$
wpinet/src/main/native/resources/
wpinet/src/main/native/thirdparty/
wpiutil/src/main/native/cpp/fs\.cpp$
wpiutil/src/main/native/include/wpi/util/FastQueue\.hpp$ wpiutil/src/main/native/include/wpi/util/FastQueue\.hpp$
wpiutil/src/main/native/include/wpi/util/fs\.hpp$
wpiutil/src/main/native/resources/
wpiutil/src/main/native/thirdparty/
wpiutil/src/test/native/cpp/json/ wpiutil/src/test/native/cpp/json/
wpiutil/src/test/native/cpp/llvm/ wpiutil/src/test/native/cpp/llvm/
wpiutil/src/test/native/cpp/span/ wpiutil/src/test/native/cpp/span/
apriltag/src/main/python/
apriltag/src/test/python/
commandsv2/src/main/python/
commandsv2/src/test/python/
datalog/src/main/python/
datalog/src/test/python/
hal/src/main/python/
hal/src/test/python/
ntcore/src/main/python/
ntcore/src/test/python/
romiVendordep/src/main/python/
romiVendordep/src/test/python/
wpilibc/src/main/python/
wpilibc/src/test/python/
wpimath/src/main/python/
wpimath/src/test/python/
wpinet/src/main/python/
wpinet/src/test/python/
wpiutil/src/main/python/
wpiutil/src/test/python/
xrpVendordep/src/main/python/
xrpVendordep/src/test/python/
} }
modifiableFileExclude { modifiableFileExclude {
BUILD.bazel \.icns$
\.patch$ \.ico$
datalog/examples/printlog/datalog\.py$ \.jinja$
gradlew gradlew
ntcoreffi/src/main/native/include/DataLogManager\.h$
objcpp/ objcpp/
thirdparty/ wpimath/src/test/native/cpp/UnitsTest\.cpp$
wpiutil/src/main/native/cpp/fs\.cpp$
wpiutil/src/main/native/include/wpi/util/fs\.hpp$
} }
licenseUpdateExclude { licenseUpdateExclude {
cscore/src/main/native/cpp/default_init_allocator\.hpp$ cscore/src/main/native/cpp/default_init_allocator\.hpp$
datalog/examples/printlog
wpiutil/src/main/native/cpp/Base64\.cpp$ wpiutil/src/main/native/cpp/Base64\.cpp$
wpiutil/src/main/native/cpp/sha1\.cpp$ wpiutil/src/main/native/cpp/sha1\.cpp$
wpiutil/src/main/native/include/wpi/util/sha1\.hpp$ wpiutil/src/main/native/include/wpi/util/sha1\.hpp$

View File

@@ -29,9 +29,9 @@ namespace wpi {
* connected and provides a match number, the log file is renamed to * connected and provides a match number, the log file is renamed to
* "WPILIB_yyyyMMdd_HHmmss_{event}_{match}.wpilog". * "WPILIB_yyyyMMdd_HHmmss_{event}_{match}.wpilog".
* *
* On startup, all existing WPILIB_TBD log files are deleted. If there is less than * On startup, all existing WPILIB_TBD log files are deleted. If there is less
* 50 MB of free space on the target storage, WPILIB_ log files are deleted (oldest * than 50 MB of free space on the target storage, WPILIB_ log files are deleted
* to newest) until there is 50 MB free OR there are 10 files remaining. * (oldest to newest) until there is 50 MB free OR there are 10 files remaining.
* *
* By default, all NetworkTables value changes are stored to the data log. * By default, all NetworkTables value changes are stored to the data log.
*/ */
@@ -118,7 +118,8 @@ struct WPI_DataLog;
* @param period time between automatic flushes to disk, in seconds; * @param period time between automatic flushes to disk, in seconds;
* this is a time/storage tradeoff * this is a time/storage tradeoff
*/ */
void DLM_Start(const struct WPI_String* dir, const struct WPI_String* filename, double period); void DLM_Start(const struct WPI_String* dir, const struct WPI_String* filename,
double period);
/** /**
* Stop data log manager. * Stop data log manager.
@@ -157,11 +158,10 @@ void DLM_GetLogDir(struct WPI_String* value);
*/ */
void DLM_LogNetworkTables(int enabled); void DLM_LogNetworkTables(int enabled);
/**
/** * Enable or disable logging of the console output. Defaults to enabled.
* Enable or disable logging of the console output. Defaults to enabled. * @param enabled true to enable, false to disable
* @param enabled true to enable, false to disable */
*/
void DLM_LogConsoleOutput(int enabled); void DLM_LogConsoleOutput(int enabled);
/** /**

View File

@@ -4,11 +4,13 @@
#include <array> #include <array>
#include <chrono> #include <chrono>
#ifdef UNIT_LIB_ENABLE_IOSTREAM
#include <iostream>
#endif
#include <string> #include <string>
#include <type_traits> #include <type_traits>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "wpi/util/print.hpp"
#include "wpi/units/acceleration.hpp" #include "wpi/units/acceleration.hpp"
#include "wpi/units/angle.hpp" #include "wpi/units/angle.hpp"
@@ -50,6 +52,7 @@
#include "wpi/units/velocity.hpp" #include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp" #include "wpi/units/voltage.hpp"
#include "wpi/units/volume.hpp" #include "wpi/units/volume.hpp"
#include "wpi/util/print.hpp"
using namespace wpi::units::acceleration; using namespace wpi::units::acceleration;
using namespace wpi::units::angle; using namespace wpi::units::angle;

View File

@@ -4,11 +4,10 @@
#include "AvahiClient.hpp" #include "AvahiClient.hpp"
#include "wpi/util/mutex.hpp" #include <memory>
#include <thread>
#include "dlfcn.h" #include "dlfcn.h"
#include "wpi/util/mutex.hpp"
using namespace wpi::net; using namespace wpi::net;

View File

@@ -15,8 +15,8 @@
#ifdef _WIN32 #ifdef _WIN32
#include <fcntl.h> #include <fcntl.h>
#include <io.h>
#include <sys/types.h> #include <sys/types.h>
#include <io.h>
// Require at least Windows 7 API. // Require at least Windows 7 API.
#define _WIN32_WINNT 0x0601 #define _WIN32_WINNT 0x0601
#define _WIN32_IE 0x0800 // MinGW at it again. FIXME: verify if still needed. #define _WIN32_IE 0x0800 // MinGW at it again. FIXME: verify if still needed.
@@ -28,11 +28,10 @@
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
#include <windows.h> #include <windows.h>
#undef WIN32_NO_STATUS #undef WIN32_NO_STATUS
#include <winternl.h>
#include <ntstatus.h> #include <ntstatus.h>
#include <shellapi.h> #include <shellapi.h>
#include <shlobj.h> #include <shlobj.h>
#include <winternl.h>
#include "wpi/util/WindowsError.hpp" #include "wpi/util/WindowsError.hpp"

View File

@@ -15,7 +15,6 @@
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
#include <string_view>
#include <system_error> #include <system_error>
namespace fs { namespace fs {