Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- './src/gamepad'
- './include/gamepad'

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.18
- uses: jidicula/clang-format-action@v4.14.0
with:
source: './src/gamepad ./include/gamepad'
extensions: 'hpp,cpp'
clangFormatVersion: 18
clang-format-version: '19'
check-path: ${{ matrix.path }}
2 changes: 1 addition & 1 deletion include/gamepad/button.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class Button {
void update(bool is_held);
/**
* @brief Get the handler object for the given event type
*
*
* @param event The desired event type
* @return nullptr The event value is invalid
* @return _impl::EventHandler<std::string>* A pointer to the given event's handler
Expand Down
2 changes: 1 addition & 1 deletion src/gamepad/screens/alertScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int32_t AlertScreen::addAlerts(uint8_t line, std::string str, uint32_t duration,
return INT32_MAX;
}

if (std::ranges::count(str, '\n') > 2) {
if (std::ranges::count(str, '\n') > 2) {
TODO("add warn logging")
errno = EMSGSIZE;
ret_val = INT32_MAX;
Expand Down
4 changes: 2 additions & 2 deletions src/gamepad/screens/defaultScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ int32_t DefaultScreen::printLine(uint8_t line, std::string str) {
const std::lock_guard<pros::Mutex> guard(m_mutex);

if (str.find('\n') != std::string::npos) {
if (std::ranges::count(str, '\n') > 2) {
TODO("add warn logging for too many lines")
if (std::ranges::count(str, '\n') > 2) {
TODO("add warn logging for too many lines")
errno = EMSGSIZE;
ret_val = INT32_MAX;
}
Expand Down