Atelier Style Compliance

Authored by rizzitello on May 19 2018, 9:59 PM.

Description

Atelier Style Compliance

Summary:
Enforce Style with script/style.sh
added pre-commit.style for use a git hook
General

  • Spaces After Commas

Includes are alphabetical order global followed by local includes, locals always use "", We don't use <Qt/...> unless needed.

#include <alib>
#include <Zlib>
#include "a.../...h"
#include "mainwindow.h"
#include "z.../...h"

For / If / else and Similar

for (...) {
   ...
}

if (...) {
 ...
} else {
 ...
}

Lambdas use this style

... [this](...) {
   ...
}
... [this] {
   ...
}

Initializers for methods and longer functions calls such as those to QMessageBox should use this style

QMessageBox::Type (
    this
    , ...
    , ...
    , ...
);

void MainWindow::MainWindow() :
    QWidget(parent)
    , counter(5)
    , i(65)

Also use Lays' and Patrick's Kde email addresses

Reviewers: laysrodrigues, tcanabrava, patrickelectric

Reviewed By: laysrodrigues

Subscribers: Atelier: General Development

Tags: Atelier: General Development

Differential Revision: https://phabricator.kde.org/D12988

Merged Changes

CommitAuthorDetailsCommitted
830ef441da66D12988rizzitello
Use Patricks kde email 
May 19 2018
5d9eb7d7894fD12988rizzitello
Viwer3D: Style Compliance 
May 19 2018
cf7d04bcd447D12988rizzitello
VideoWidget: Style Compliance 
May 19 2018
e94d0584c2c6D12988rizzitello
ThermoWidget: Style Compliance 
May 19 2018
031bfec2f08eD12988rizzitello
GCodeEditorWidget: Style Compliance 
May 19 2018
749764913ee1D12988rizzitello
BedExtruderWidget: Style Compliance 
May 19 2018
6b87cea1ab34D12988rizzitello
AtCoreInstanceWidget: Style Compliance 
May 19 2018
767d7b07b05cD12988rizzitello
ProfileDialog: Style Compliance 
May 19 2018
cb92e871e733D12988rizzitello
ChooseFileDialog: Style Compliance 
May 19 2018
cbfad587ab85D12988rizzitello
Mainwindow: Style Compliance 
May 19 2018
2c18b2d1299eD12988rizzitello
main.cpp: Style Compliance 
May 19 2018
9b95dab44ca1D12988rizzitello
Style script run 
May 19 2018
10c5f6ccd299D12988rizzitello
Add style script and a pre-commit script 
May 19 2018