Skip to content

Google style in clang-format

Paul Gessinger requested to merge google-format into master

After this

template <
    typename T2,
    typename _E = E,
    typename _T = T,
    typename    = std::
        enable_if_t<!std::
                        is_same_v<_T,
                                  _E> && !std::is_constructible_v<_T, _E> && !std::is_constructible_v<_T, _E>>>
Result(T2 value) noexcept : m_var(std::move(value))
{
}

particularly egregious example of clang-format v4 using our styling rules, I thought we might want to revisit them. This MR bumps the clang-format version to v7, and removes most of our custom styling rules, replacing them with a preset based on the Google style.

The code from above formats like this, if you're interested in the rest, checkout the changes here.

template <typename T2, typename _E = E, typename _T = T,
          typename = std::enable_if_t<!std::is_same_v<_T, _E> &&
                                      !std::is_constructible_v<_T, _E> &&
                                      !std::is_constructible_v<_T, _E>>>
Result(T2 value) noexcept : m_var(std::move(value)) {}

The CI should fail on the format job, since this is formatted with v7 on my machine, but the CI still uses v4.

Thoughts? (Silence will be interpreted as approval ¯\_(ツ)_/¯ )

Closes #352 (closed)

Edited by Paul Gessinger

Merge request reports

Loading