Commit Graph

4 Commits

Author SHA1 Message Date
John Beard 272c045c37 Format: Default to switch cases on separate lines by default
Currently, the format enforces single lines when possible, but does
not enforce readable column-based alignment (and, moreover, *removes*
such manually added alignment:

    switch( m_orientation )
    {
    case PIN_RIGHT: m_orientation = PIN_UP; break;
    case PIN_UP: m_orientation = PIN_LEFT; break;
    }

Change this to multi-line by default:

    switch( m_orientation )
    {
    case PIN_RIGHT:
        m_orientation = PIN_UP;
        break;
    case PIN_UP:
        m_orientation = PIN_LEFT;
        break;
    }

If the developer wishes for column-aligned single-line cases, this
is permitted, but much be done manually:

    switch( m_orientation )
    {
    case PIN_RIGHT: m_orientation = PIN_DOWN;  break;
    case PIN_UP:    m_orientation = PIN_RIGHT; break;
    }

CHANGE: the _clang-format file to reflect this, and add note about
manual override in the dev docs.
2019-05-07 09:49:05 +01:00
John Beard 3536840f52 Clang-format: break after templates
Enforce the following format:

template<>
void function<TYPE>()

Rather than:

template<> void function<TYPE>()

This is the more common format in KiCad (about 8:1) and agrees
with the uncrustify.cfg rules.
2019-03-27 14:13:23 +00:00
John Beard e4a10ac355 Tweak _clang-format to bring closer to 'normal' KiCad style 2017-03-20 09:45:51 -04:00
Chris Pavlina e96673ed8d Add clang-format configuration 2017-03-13 09:56:25 -04:00