mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ci] Upgrade wpiformat (#8124)
See https://github.com/wpilibsuite/styleguide/pull/312
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
color: false
|
||||
definitions: [cmake/modules]
|
||||
line_length: 100
|
||||
list_expansion: favour-inlining
|
||||
quiet: false
|
||||
unsafe: false
|
||||
|
||||
4
.github/workflows/lint-format.yml
vendored
4
.github/workflows/lint-format.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: Install wpiformat
|
||||
run: |
|
||||
python -m venv ${{ runner.temp }}/wpiformat
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.33
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34
|
||||
- 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.33
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34
|
||||
- name: Create compile_commands.json
|
||||
run: |
|
||||
./gradlew generateCompileCommands -Ptoolchain-optional-roboRio
|
||||
|
||||
@@ -773,8 +773,7 @@ void MjpegServerImpl::ConnThread::SendStream(wpi::raw_socket_ostream& os) {
|
||||
lastFrameTime = thisFrameTime;
|
||||
double timestamp = lastFrameTime / 1000000.0;
|
||||
header.clear();
|
||||
oss << "\r\n--" BOUNDARY "\r\n"
|
||||
<< "Content-Type: image/jpeg\r\n";
|
||||
oss << "\r\n--" BOUNDARY "\r\n" << "Content-Type: image/jpeg\r\n";
|
||||
wpi::print(oss, "Content-Length: {}\r\n", size);
|
||||
wpi::print(oss, "X-Timestamp: {}\r\n", timestamp);
|
||||
oss << "\r\n";
|
||||
|
||||
@@ -398,8 +398,9 @@ void HAL_SetCTREPCMOneShotDuration(HAL_CTREPCMHandle handle, int32_t index,
|
||||
}
|
||||
|
||||
std::scoped_lock lock{pcm->lock};
|
||||
pcm->oneShot.sol10MsPerUnit[index] = (std::min)(
|
||||
static_cast<uint32_t>(durMs) / 10, static_cast<uint32_t>(0xFF));
|
||||
pcm->oneShot.sol10MsPerUnit[index] =
|
||||
(std::min)(static_cast<uint32_t>(durMs) / 10,
|
||||
static_cast<uint32_t>(0xFF));
|
||||
HAL_WriteCANPacketRepeating(pcm->canHandle, pcm->oneShot.sol10MsPerUnit, 8,
|
||||
Control3, SendPeriod, status);
|
||||
}
|
||||
|
||||
@@ -334,9 +334,9 @@ std::optional<std::vector<uint8_t>> WireDecoder3::ReadRaw(
|
||||
}
|
||||
|
||||
// string data
|
||||
size_t toCopy = (std::min)(
|
||||
static_cast<size_t>(in->size()),
|
||||
static_cast<size_t>(m_rawReader.len.value() - m_rawReader.buf.size()));
|
||||
size_t toCopy = (std::min)(static_cast<size_t>(in->size()),
|
||||
static_cast<size_t>(m_rawReader.len.value() -
|
||||
m_rawReader.buf.size()));
|
||||
m_rawReader.buf.insert(m_rawReader.buf.end(), in->begin(),
|
||||
in->begin() + toCopy);
|
||||
*in = wpi::drop_front(*in, toCopy);
|
||||
|
||||
@@ -482,8 +482,7 @@ constexpr dimensionless::scalar_t log2(const ScalarUnit x) noexcept {
|
||||
template <
|
||||
class UnitType,
|
||||
std::enable_if_t<units::traits::has_linear_scale<UnitType>::value, int> = 0>
|
||||
inline constexpr auto sqrt(const UnitType& value) noexcept
|
||||
-> unit_t<
|
||||
inline constexpr auto sqrt(const UnitType& value) noexcept -> unit_t<
|
||||
square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>,
|
||||
typename units::traits::unit_t_traits<UnitType>::underlying_type,
|
||||
linear_scale> {
|
||||
@@ -742,8 +741,8 @@ template <class UnitTypeLhs, class UnitMultiply, class UnitAdd,
|
||||
class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value &&
|
||||
traits::is_unit_t<UnitMultiply>::value &&
|
||||
traits::is_unit_t<UnitAdd>::value>>
|
||||
auto fma(const UnitTypeLhs x, const UnitMultiply y,
|
||||
const UnitAdd z) noexcept -> decltype(x * y) {
|
||||
auto fma(const UnitTypeLhs x, const UnitMultiply y, const UnitAdd z) noexcept
|
||||
-> decltype(x * y) {
|
||||
using resultType = decltype(x * y);
|
||||
static_assert(
|
||||
traits::is_convertible_unit_t<
|
||||
|
||||
Reference in New Issue
Block a user