Skip to content

Commit

Permalink
Bump linters and fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercotui committed Oct 23, 2024
1 parent a7699b7 commit 8e55a0b
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 26 deletions.
13 changes: 8 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: check-merge-conflict
- id: trailing-whitespace

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.31.1
rev: v0.42.0
hooks:
- id: markdownlint
args: [--disable=MD013]
Expand All @@ -25,8 +25,11 @@ repos:
# - id: clang-tidy
# - id: cppcheck

- repo: https://github.com/bmorcos/pre-commit-hooks-cpp
rev: 9a5aa38207bf557961110d6a4f7e3a9d352911f9
- repo: https://github.com/cpplint/cpplint
rev: 2.0.0
hooks:
- id: cpplint
args: [--filter=-legal/copyright]
# Disabled rules:
# - legal/copyright: I don't care about copyright headers in my opensource code
# - whitespace/indent_namespace: Many false positives about continuation indentation inside namespaces.
args: ["--filter=-legal/copyright,-whitespace/indent_namespace"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Animation {
}
```

## Dependencies:
## Dependencies

The API backend in written in Qt, because it has a nice and easy to use Javascript engine 🤷.

Expand Down
2 changes: 1 addition & 1 deletion service/animation_runner/animation_runner.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "animation_runner/animation_runner.hpp"

#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtCore/QDirIterator>
#include <QtCore/QLoggingCategory>
#include <QtCore/QThread>
#include <algorithm>
#include <memory>
#include <utility>

Q_LOGGING_CATEGORY(AnimationRunnerLog, "animation.runner", QtInfoMsg)
Expand Down
2 changes: 0 additions & 2 deletions service/animation_runner/animation_runner.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once

#include <QtCore/QDateTime>
#include <QtCore/QObject>
#include <QtCore/QSize>
#include <QtCore/QTimer>
#include <QtQml/QJSEngine>
#include <atomic>
Expand Down
8 changes: 4 additions & 4 deletions service/animation_runner/screen_interface_js.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "animation_runner/screen_interface_js.hpp"

#include <QColor>
#include <QLoggingCategory>
#include <QObject>
#include <QSize>
#include <QtGui/QColor>
#include <QtCore/QLoggingCategory>
#include <QtCore/QObject>
#include <QtCore/QSize>
#include <vector>

Q_LOGGING_CATEGORY(ScreenInterfaceLog, "animation.screeninterface", QtInfoMsg)
Expand Down
6 changes: 3 additions & 3 deletions service/animation_runner/screen_interface_js.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <QColor>
#include <QObject>
#include <QSize>
#include <QtGui/QColor>
#include <QtCore/QObject>
#include <QtCore/QSize>
#include <vector>

class ScreenInterfaceJs : public QObject {
Expand Down
6 changes: 4 additions & 2 deletions service/animation_runner/tests/animation_runner_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "animation_runner/animation_runner.hpp"

#include <QCoreApplication>
#include <QTimer>
#include <QtCore/QCoreApplication>
#include <QtCore/QTimer>
#include <memory>
#include <utility>

#include "animation_runner/tests/screen_controller_mock.hpp"
#include "gmock/gmock.h"
Expand Down
1 change: 1 addition & 0 deletions service/http_server/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <QtCore/QLoggingCategory>
#include <QtCore/QStringLiteral>
#include <memory>
#include <string_view>
#include <utility>

Expand Down
3 changes: 2 additions & 1 deletion service/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <QtCore/QCache>
#include <QtCore/QtCore>
#include <QtNetwork/QHostAddress>
#include <memory>
#include <utility>

#include "animation_runner/animation_runner.hpp"
#include "animation_runner/animation_thread.hpp"
Expand Down
1 change: 1 addition & 0 deletions service/screen/demo/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <QtCore/QThread>
#include <QtCore/QtCore>
#include <vector>

#include "screen/demo/user_interface.hpp"
#include "screen/screen_controller.hpp"
Expand Down
3 changes: 2 additions & 1 deletion service/screen/dummy_screen_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "screen/dummy_screen_controller.hpp"

#include <QLoggingCategory>
#include <QtCore/QLoggingCategory>
#include <vector>

namespace {
constexpr int kScreenWidth = 8;
Expand Down
3 changes: 2 additions & 1 deletion service/screen/screen_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "screen/screen_controller.hpp"

#include <QLoggingCategory>
#include <QtCore/QLoggingCategory>
#include <vector>

#include "thirdparty/rpi_ws281x/ws2811.h"

Expand Down
4 changes: 2 additions & 2 deletions service/screen/screen_controller_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <QColor>
#include <QSize>
#include <QtGui/QColor>
#include <QtCore/QSize>
#include <vector>

class ScreenControllerInterface {
Expand Down
1 change: 0 additions & 1 deletion service/scripts_cache/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QtCore/QJsonArray>
#include <unordered_set>
#include <utility>

Script::Script(ScriptName name, ScriptCode code,
std::unordered_set<ScriptType> types)
Expand Down
1 change: 1 addition & 0 deletions service/scripts_cache/scripts_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QLoggingCategory>
#include <unordered_set>

namespace {
constexpr auto kDefaultSaveFile = "./animations.json";
Expand Down
4 changes: 2 additions & 2 deletions service/signal_monitor/signal_monitor.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include <signal.h>

#include <QObject>
#include <QSocketNotifier>
#include <QtCore/QObject>
#include <QtCore/QSocketNotifier>
#include <vector>

class SignalMonitor : public QObject {
Expand Down

0 comments on commit 8e55a0b

Please sign in to comment.