Skip to content

Commit f465dc5

Browse files
authored
iwyu.yml: use OpenSUSE to get latest include-what-you-use / cleaned up includes (cppcheck-opensource#5673)
To keep with the program we have to bunny-hop to yet another distro to get the latest version of `include-what-you-use`.
1 parent 5804ef7 commit f465dc5

76 files changed

Lines changed: 90 additions & 86 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/iwyu.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
image: ["fedora:latest"] # "debian:unstable" / "archlinux:latest"
18+
image: ["opensuse/tumbleweed:latest"] # "fedora:latest" / "debian:unstable" / "archlinux:latest"
1919

2020
runs-on: ubuntu-22.04
2121

2222
container:
23-
image: "fedora:latest"
23+
image: ${{ matrix.image }}
2424

2525
steps:
2626
- uses: actions/checkout@v3
@@ -60,6 +60,14 @@ jobs:
6060
ln -s iwyu_tool.py /usr/bin/iwyu_tool
6161
ln -s qt5 /usr/include/qt
6262
63+
- name: Install missing software on OpenSUSE
64+
if: contains(matrix.image, 'opensuse')
65+
run: |
66+
zypper install -y cmake gcc-c++ pcre-devel libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5PrintSupport-devel libqt5-linguist-devel libqt5-qttools-devel libQt5Network-devel libQt5Charts5-devel libQt5Test-devel
67+
zypper install -y wget include-what-you-use-tools
68+
ln -s iwyu_tool.py /usr/bin/iwyu_tool
69+
ln -s qt5 /usr/include/qt
70+
6371
# TODO: switch to Qt 6 after we enabled the Qt mappings again
6472
- name: Prepare CMake
6573
run: |
@@ -86,7 +94,8 @@ jobs:
8694
- name: iwyu_tool
8795
run: |
8896
PWD=$(pwd)
89-
iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -Xiwyu --mapping_file=$PWD/qt5.imp -isystem/usr/lib/clang/17/include > iwyu.log
97+
# -isystem/usr/lib/clang/17/include
98+
iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -Xiwyu --mapping_file=$PWD/qt5.imp > iwyu.log
9099
91100
- uses: actions/upload-artifact@v3
92101
if: success() || failure()

cli/cmdlineparser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
#include <cstdio>
4747
#include <cstdlib> // EXIT_FAILURE
4848
#include <cstring>
49-
#include <fstream> // IWYU pragma: keep
49+
#include <fstream>
5050
#include <iostream>
5151
#include <iterator>
5252
#include <list>
5353
#include <set>
54-
#include <sstream> // IWYU pragma: keep
54+
#include <sstream>
5555
#include <unordered_set>
5656
#include <utility>
5757

cli/cppcheckexecutor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@
4444
#include <cstdio>
4545
#include <cstdlib> // EXIT_SUCCESS and EXIT_FAILURE
4646
#include <ctime>
47+
#include <fstream>
4748
#include <iostream>
4849
#include <list>
4950
#include <set>
50-
#include <sstream> // IWYU pragma: keep
51+
#include <sstream>
5152
#include <unordered_set>
5253
#include <utility>
5354
#include <vector>

cli/executor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "suppressions.h"
2626

2727
#include <cassert>
28-
#include <sstream> // IWYU pragma: keep
28+
#include <sstream>
2929
#include <utility>
3030

3131
struct FileSettings;

cli/processexecutor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
#include <iostream>
4040
#include <list>
4141
#include <map>
42-
#include <sstream> // IWYU pragma: keep
42+
#include <sstream>
4343
#include <sys/select.h>
44+
#include <sys/time.h>
4445
#include <sys/wait.h>
4546
#include <unistd.h>
4647
#include <utility>

externals/simplecpp/simplecpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
#include <cstring>
2121
#include <ctime>
2222
#include <exception>
23-
#include <fstream> // IWYU pragma: keep
23+
#include <fstream>
2424
#include <iostream>
2525
#include <limits>
2626
#include <list>
2727
#include <map>
2828
#include <set>
29-
#include <sstream> // IWYU pragma: keep
29+
#include <sstream>
3030
#include <stack>
3131
#include <stdexcept>
3232
#include <string>

gui/checkthread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
#include <algorithm>
3434
#include <cstddef>
35+
#include <fstream>
3536
#include <iterator>
3637
#include <list>
37-
#include <ostream>
3838
#include <set>
3939
#include <string>
4040
#include <utility>

lib/analyzerinfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include <cstring>
2727
#include <map>
28-
#include <sstream> // IWYU pragma: keep
2928

3029
#include "xml.h"
3130

lib/checkersreport.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <map>
2626
#include <sstream>
2727
#include <unordered_set>
28-
#include <utility>
2928
#include <vector>
3029

3130
static bool isCppcheckPremium(const Settings& settings) {

lib/checkfunctions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
#include <map>
3333
#include <string>
34-
#include <utility>
3534

3635
class Token;
3736
class ErrorLogger;

0 commit comments

Comments
 (0)