diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..50e58ff --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,5 @@ +--- +Checks: + - '*' # Enable all checks + - '-clang-diagnostic-error' + - '-modernize-use-trailing-return-type' \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..9ceea04 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,43 @@ +# Run code style tests + +name: Code Checks + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + checks: + + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: 5.13.2 + - name: Build qwt + run: | + cd qwt + qmake qwt.pro + make + - uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tidy-checks: '' # Refer to .clang-tidy file for checks + ignore: "build|plugins|fft|qwt|ui_tmp|unit_test|pythonqt" + ignore-format: "build|plugins|fft|qwt|ui_tmp|unit_test|pythonqt" + thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} + - name: Failure + if: steps.linter.outputs.checks-failed > 0 + run: exit 1 \ No newline at end of file diff --git a/.github/workflows/lint.yaml.todo b/.github/workflows/lint.yaml.todo deleted file mode 100644 index eab8307..0000000 --- a/.github/workflows/lint.yaml.todo +++ /dev/null @@ -1,27 +0,0 @@ -# Run code style tests - -name: Code Style - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - lint: - - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Run clang-tidy - uses: HorstBaerbel/action-clang-tidy@1.2 - with: - scandir: 'src' - builddir: 'build' \ No newline at end of file diff --git a/src/data_source.cpp b/src/data_source.cpp index 989197b..1cd9352 100644 --- a/src/data_source.cpp +++ b/src/data_source.cpp @@ -1,14 +1,13 @@ -#include -#include -#include +#include +#include +#include #include "data_source.hpp" -DataSource::DataSource(QString lbl) : - label(lbl) +DataSource::DataSource(QString lbl) : label(lbl) { - // TODO + // TODO - anything to do here? }