Skip to content

Commit

Permalink
Fix clang-format checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
kubasejdak committed Jan 1, 2020
1 parent 848668f commit f85ddb7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions lib/freertos/Mutex.cpp
Expand Up @@ -37,16 +37,14 @@
namespace osal {
namespace detail {

struct MutexImpl {
};
struct MutexImpl {};

} // namespace detail

Mutex::Mutex(MutexType type) noexcept
: m_type(type)
, m_impl(std::make_unique<detail::MutexImpl>())
{
}
{}

Mutex::~Mutex() = default;

Expand Down
2 changes: 2 additions & 0 deletions lib/include/osal/Error.hpp
Expand Up @@ -37,13 +37,15 @@

namespace osal {

// clang-format off
enum class Error {
eOk,
eRecursiveUsage,
eNotOwner,
eNotLocked,
eLocked
};
// clang-format on

// NOLINTNEXTLINE(readability-identifier-naming)
std::error_code make_error_code(Error error);
Expand Down
2 changes: 2 additions & 0 deletions lib/include/osal/Mutex.hpp
Expand Up @@ -40,10 +40,12 @@

namespace osal {

// clang-format off
enum class MutexType {
eNonRecursive,
eRecursive
};
// clang-format on

namespace detail {

Expand Down
3 changes: 1 addition & 2 deletions lib/linux/Mutex.cpp
Expand Up @@ -51,8 +51,7 @@ struct MutexImpl {
Mutex::Mutex(MutexType type) noexcept
: m_type(type)
, m_impl(std::make_unique<detail::MutexImpl>())
{
}
{}

Mutex::~Mutex() = default;

Expand Down
2 changes: 1 addition & 1 deletion tools/check-clang-format.sh
Expand Up @@ -5,7 +5,7 @@ echo "Running clang-format..."

for SRC_PATH in "$@"; do
ALL_SOURCES=$(find "${SRC_PATH}" -iname "*.h" -o -iname "*.hpp" -o -iname "*.c" -o -iname "*.cpp")
TO_CHECK_SOURCES=$(echo "${TO_CHECK_SOURCES}" | sed '/FreeRTOSConfig.h/d')
TO_CHECK_SOURCES=$(echo "${ALL_SOURCES}" | sed '/FreeRTOSConfig.h/d')

echo "${TO_CHECK_SOURCES}" | xargs clang-format -style=file -fallback-style=none -i
done
Expand Down

0 comments on commit f85ddb7

Please sign in to comment.