From fb875aa43e891e72afe3a44e9d66d938ec23b21d Mon Sep 17 00:00:00 2001 From: Alberto Nidasio <alberto.nidasio@skywarder.eu> Date: Sat, 8 Oct 2022 10:00:05 +0200 Subject: [PATCH] [CI] Added CI and removed copyright check --- .gitlab-ci.yml | 49 +++++++++++++++++++++ .vscode/settings.json | 1 + sbs | 7 --- src/shared/Core/QCustomPlot/QCustomPlot.cpp | 4 +- 4 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..ffd9b0a8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,49 @@ +# Copyright (c) 2022 Skyward Experimental Rocketry +# Authors: Alberto Nidasio +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +stages: + - lint + +# Stage lint + +cppcheck: + stage: lint + tags: + - miosix + script: + - ./scripts/linter.py --cppcheck src + +format: + stage: lint + tags: + - miosix + script: + - ./scripts/linter.py --format src + +find: + stage: lint + tags: + - miosix + script: + - ./scripts/linter.py --find src diff --git a/.vscode/settings.json b/.vscode/settings.json index b978d1da..8d85298b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -162,6 +162,7 @@ "cppcheck", "entrypoints", "Mavlink", + "Nidasio", "Plottables", "qobject", "qresource", diff --git a/sbs b/sbs index b19ef395..d88d8602 100755 --- a/sbs +++ b/sbs @@ -192,12 +192,6 @@ list() { | grep -Po '^.*/\K\w*(?=_autogen)' | uniq } -lint_copyright() { - ohai "Lint (Copyright)" - - "$sbs_base/scripts/linter.py" --copyright "$source_dir/src" -} - lint_find() { ohai "Lint (Find)" @@ -255,7 +249,6 @@ lint() { declare to_edit="$1" if [ "$found_python" = true ]; then - lint_copyright lint_find fi diff --git a/src/shared/Core/QCustomPlot/QCustomPlot.cpp b/src/shared/Core/QCustomPlot/QCustomPlot.cpp index 44e767d1..d96e14f5 100644 --- a/src/shared/Core/QCustomPlot/QCustomPlot.cpp +++ b/src/shared/Core/QCustomPlot/QCustomPlot.cpp @@ -5795,8 +5795,8 @@ void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, { QCPVector2D widthVecPerp = widthVec.perpendicular(); QPointF points[4] = { - (pos - widthVecPerp).toPointF(), (pos - widthVec).toPointF(), - (pos + widthVecPerp).toPointF(), (pos + widthVec).toPointF()}; + (pos - widthVecPerp).toPointF(), (pos - widthVec).toPointF(), + (pos + widthVecPerp).toPointF(), (pos + widthVec).toPointF()}; painter->setPen(miterPen); painter->setBrush(brush); painter->drawConvexPolygon(points, 4); -- GitLab