Skip to content

Commit

Permalink
Use Clang image to run iwyu (#4574)
Browse files Browse the repository at this point in the history
* 🔧 use Clang image to run iwyu

* 🔧 use Clang image to run iwyu
  • Loading branch information
nlohmann authored Dec 29, 2024
1 parent 8314ac2 commit 0fa326a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ jobs:
matrix:
target: [
ci_test_amalgamation, # needs AStyle
ci_infer, # needs Infer
ci_single_binaries # needs iwyu
ci_infer # needs Infer
]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -98,10 +97,10 @@ jobs:
container: silkeh/clang:dev
strategy:
matrix:
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze]
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze, ci_single_binaries]
steps:
- name: Install git, clang-tools, and unzip
run: apt-get update ; apt-get install -y git clang-tools unzip
run: apt-get update ; apt-get install -y git clang-tools iwyu unzip
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@5979409e62bdf841487c5fb3c053149de97a86d3 # v3.31.2
Expand Down
7 changes: 4 additions & 3 deletions include/nlohmann/detail/conversions/to_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

#pragma once

#include <algorithm> // copy
#include <iterator> // begin, end
#include <nlohmann/detail/macro_scope.hpp> // JSON_HAS_CPP_17
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#endif

#include <algorithm> // copy
#include <iterator> // begin, end
#include <string> // string
#include <tuple> // tuple, get
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
Expand All @@ -21,7 +23,6 @@
#include <vector> // vector

#include <nlohmann/detail/iterators/iteration_proxy.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/std_fs.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
Expand Down
9 changes: 5 additions & 4 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5267,11 +5267,14 @@ NLOHMANN_JSON_NAMESPACE_END



#include <algorithm> // copy
#include <iterator> // begin, end
// #include <nlohmann/detail/macro_scope.hpp>
// JSON_HAS_CPP_17
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#endif

#include <algorithm> // copy
#include <iterator> // begin, end
#include <string> // string
#include <tuple> // tuple, get
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
Expand Down Expand Up @@ -5558,8 +5561,6 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy<IteratorType>> = true;
#endif

// #include <nlohmann/detail/macro_scope.hpp>

// #include <nlohmann/detail/meta/cpp_future.hpp>

// #include <nlohmann/detail/meta/std_fs.hpp>
Expand Down

0 comments on commit 0fa326a

Please sign in to comment.