diff --git a/.clang-format b/.clang-format index 5a3e763..4b884fb 100644 --- a/.clang-format +++ b/.clang-format @@ -7,4 +7,4 @@ AllowShortIfStatementsOnASingleLine: Never IndentCaseLabels: false ColumnLimit: 120 AccessModifierOffset: -4 -InsertNewlineAtEOF: true +AlwaysBreakAfterDefinitionReturnType: All \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 92b9ea4..136aa28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,6 @@ repos: rev: v1.3.5 hooks: - id: clang-format - args: [--style=Google] - exclude: '^communicator/main.cpp$|^communicator/mainwindow.cpp$|^communicator/mainwindow.h$' #auto generated files - id: clang-tidy exclude: '^communicator/main.cpp$|^communicator/mainwindow.cpp$|^communicator/mainwindow.h$|^communicator/tests/exampleTest.cpp$' #auto generated files - id: cppcheck diff --git a/communicator/main.cpp b/communicator/main.cpp index fd3e533..c9218b5 100644 --- a/communicator/main.cpp +++ b/communicator/main.cpp @@ -1,9 +1,9 @@ -#include "mainwindow.h" - #include -int main(int argc, char *argv[]) -{ +#include "mainwindow.h" + +int +main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); diff --git a/communicator/mainwindow.cpp b/communicator/mainwindow.cpp index 6395a77..015a204 100644 --- a/communicator/mainwindow.cpp +++ b/communicator/mainwindow.cpp @@ -1,14 +1,7 @@ #include "mainwindow.h" + #include "./ui_mainwindow.h" -MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent) - , ui(new Ui::MainWindow) -{ - ui->setupUi(this); -} +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } -MainWindow::~MainWindow() -{ - delete ui; -} +MainWindow::~MainWindow() { delete ui; } diff --git a/communicator/mainwindow.h b/communicator/mainwindow.h index f7a3da3..036d1fa 100644 --- a/communicator/mainwindow.h +++ b/communicator/mainwindow.h @@ -9,8 +9,7 @@ class MainWindow; } QT_END_NAMESPACE -class MainWindow : public QMainWindow -{ +class MainWindow : public QMainWindow { Q_OBJECT public: @@ -20,4 +19,4 @@ class MainWindow : public QMainWindow private: Ui::MainWindow *ui; }; -#endif // MAINWINDOW_H +#endif // MAINWINDOW_H diff --git a/communicator/tests/exampleTest.cpp b/communicator/tests/exampleTest.cpp index 8983b2d..81c5116 100644 --- a/communicator/tests/exampleTest.cpp +++ b/communicator/tests/exampleTest.cpp @@ -2,8 +2,8 @@ // Demonstrate some basic assertions. TEST(exampleTest, BasicAssertions) { - // Expect two strings not to be equal. - EXPECT_STRNE("hello", "world"); - // Expect equality. - EXPECT_EQ(7 * 6, 42); + // Expect two strings not to be equal. + EXPECT_STRNE("hello", "world"); + // Expect equality. + EXPECT_EQ(7 * 6, 42); } \ No newline at end of file