Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable linting step #106

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
Checks:
- '*' # Enable all checks
- '-clang-diagnostic-error'
- '-modernize-use-trailing-return-type'
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 0 additions & 27 deletions .github/workflows/lint.yaml.todo

This file was deleted.

11 changes: 5 additions & 6 deletions src/data_source.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <QFile>

Check notice on line 1 in src/data_source.cpp

View workflow job for this annotation

GitHub Actions / checks

Run clang-format on src/data_source.cpp

File src/data_source.cpp does not conform to LLVM style guidelines. (lines 1, 5, 8, 9, 11, 14, 15, 16, 17, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 37, 44, 45, 46, 48, 49, 50, 51, 53, 55, 57, 59, 62, 66, 67, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 88, 89, 91, 92, 93, 94, 95, 96, 98, 100, 101, 103, 104, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 119, 123, 128, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 141, 142, 143, 145, 147, 148, 149, 150, 152, 155, 158, 159, 161, 164, 165, 166, 167, 168, 169, 170, 172, 175, 183, 184, 185, 187, 188, 189, 190, 192, 194, 197, 198, 199, 200, 201, 202, 203, 205, 206, 207, 208, 210, 211, 212, 214, 216, 224, 225, 226, 227, 228, 229, 231, 233, 236, 237, 238, 239, 240, 242, 243, 244, 245, 247, 248, 249, 250, 251, 253, 256, 257, 258, 260, 261, 262, 264, 270, 271, 272, 274, 275, 276, 277, 278, 279, 280, 283, 286, 287, 288, 291, 292, 293, 297, 301, 302, 303, 305, 307, 309, 310, 311, 312, 314, 315, 316, 317, 318, 320, 323, 329, 330, 331, 332, 333, 334, 335, 337, 338, 340, 341, 342, 343, 344, 345, 347, 348, 350, 353, 357, 361, 362, 363, 365, 367, 368, 369, 370, 372, 373, 374, 375, 377, 378, 379, 380, 382, 383, 384, 386, 387, 388, 389, 390, 391, 392, 393, 395, 398, 399, 400, 402, 403, 404, 405, 406, 407, 408, 410, 416, 417, 418, 419, 421, 422, 424, 425, 426, 428, 429, 431, 433, 434, 435, 436, 438, 440, 441, 442, 445, 448, 449, 450, 452, 456, 459, 460, 462, 465, 466, 467, 468, 471, 472, 473, 475, 478, 481, 482, 483, 485, 486, 487, 489, 490, 493, 496, 497, 498, 501, 504, 505, 506, 507, 508, 510, 511, 512, 513, 514, 517, 520, 521, 522, 524, 525, 526, 527, 528, 530, 531, 532, 534, 536, 538, 541, 547, 549, 550, 551, 552, 553, 554, 556, 558, 562, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 577, 578, 581, 585, 588, 590, 591, 592, 593, 594, 596, 597, 598, 599, 601, 602, 605, 609, 612, 614, 615, 616, 617, 618, 620, 621, 622, 623, 624, 627, 631, 634, 635, 636, 637, 638, 639, 641, 642, 643)

Check failure on line 1 in src/data_source.cpp

View workflow job for this annotation

GitHub Actions / checks

src/data_source.cpp:1:10 [clang-diagnostic-error]

'QFile' file not found
#include <QFileInfo>
#include <QDir>

#include "data_source.hpp"


DataSource::DataSource(QString lbl) :
label(lbl)
DataSource::DataSource(QString lbl) : label(lbl)
{
// TODO
// TODO - anything to do here?
}


Expand Down
Loading