Skip to content

Commit

Permalink
apply clang-tidy include cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
eliogovea committed Mar 8, 2024
1 parent 0f14f3f commit 1110718
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 10 deletions.
7 changes: 6 additions & 1 deletion sources/dns_decode.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#include "dns_decode.hpp"

#include <arpa/inet.h>
#include <netinet/in.h>

#include <cstdint>
#include <cstring>
#include <optional>
#include <span>
#include <vector>

#include "dns.hpp"
#include "dns_name.hpp"
#include "dns_record.hpp"

namespace DNS {
auto Decode(std::uint8_t const* msg_ptr,
Expand Down
6 changes: 3 additions & 3 deletions sources/dns_decode_fuzzer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iterator>
#include <utility>
#include <vector>
#include <cstddef>
#include <cstdint>

#include "dns.hpp"
#include "dns_decode.hpp"

extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
Expand Down
6 changes: 6 additions & 0 deletions sources/dns_decode_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#include <cstdint>
#include <vector>

#include <gtest/gtest.h>

#include "dns.hpp"
#include "dns_decode.hpp"
#include "dns_name.hpp"
#include "dns_record.hpp"

TEST(dns_decoder, decode_16_bits_integer)
{
Expand Down
9 changes: 8 additions & 1 deletion sources/dns_encode.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#include "dns_encode.hpp"

#include <arpa/inet.h>
#include <netinet/in.h>

#include <cstdint>
#include <cstring>
#include <iterator>
#include <numeric>
#include <span>

#include "dns.hpp"
#include "dns_name.hpp"
#include "dns_record.hpp"

namespace DNS {
Header MakeHeader(Message const& message)
Expand Down
7 changes: 7 additions & 0 deletions sources/dns_encode_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#include <cstdint>
#include <iterator>
#include <vector>

#include <gtest/gtest.h>

#include "dns.hpp"
#include "dns_record.hpp"

#include "dns_encode.hpp"

TEST(dns_encoder, encode_record)
Expand Down
6 changes: 6 additions & 0 deletions sources/dns_name.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#include "dns_name.hpp"

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <span>
#include <string>
#include <variant>

namespace DNS {
auto ToNameView(Name const& name) -> NameView
Expand Down
5 changes: 3 additions & 2 deletions sources/dns_name_fuzzer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <iterator>
#include <utility>
#include <cstddef>
#include <cstdint>
#include <span>
#include <vector>

#include "dns_name.hpp"
Expand Down
6 changes: 6 additions & 0 deletions sources/dns_name_test.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

#include <gtest/gtest.h>

#include "dns_name.hpp"
Expand Down
2 changes: 2 additions & 0 deletions sources/dns_record.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "dns_record.hpp"

#include <variant>

namespace DNS {
auto ToRecordDataView(RecordData const& data) -> RecordDataView
{
Expand Down
9 changes: 6 additions & 3 deletions sources/dns_resolver_testapp.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#include <linux/socket.h>

#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>

#include <array>
#include <cstdint>
#include <cstdlib>
#include <format>
#include <iomanip>
#include <iostream>
#include <span>
#include <vector>

#include "dns.hpp"
#include "dns_decode.hpp"
#include "dns_encode.hpp"
#include "dns_name.hpp"
#include "dns_record.hpp"

void HexDump(std::ostream& output, std::span<std::uint8_t const> const& data)
{
Expand Down

0 comments on commit 1110718

Please sign in to comment.