Skip to content

Commit

Permalink
Apply clang-tidy fix for misc-clean-include (cieslarmichal#621)
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries authored and 00thirdeye00 committed Jun 20, 2024
1 parent aae9052 commit 4b2ee27
Show file tree
Hide file tree
Showing 93 changed files with 326 additions and 34 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ project(faker-cxx LANGUAGES CXX)

include(cmake/CompilerWarnings.cmake)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

option(USE_SYSTEM_DEPENDENCIES "Use fmt and GTest from system" OFF)

if (NOT USE_SYSTEM_DEPENDENCIES)
Expand Down
6 changes: 4 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
Expand All @@ -113,7 +114,8 @@
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
}
],
Expand Down
3 changes: 3 additions & 0 deletions src/common/FormatHelper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "FormatHelper.h"

#include <functional>
#include <stdexcept>
#include <string>
#include <unordered_map>

namespace faker
{
Expand Down
4 changes: 4 additions & 0 deletions src/common/LuhnCheck.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "LuhnCheck.h"

#include <algorithm>
#include <cctype>
#include <string>

namespace faker
{
int LuhnCheck::luhnCheckSum(const std::string& inputString)
Expand Down
4 changes: 4 additions & 0 deletions src/common/PrecisionMapper.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "PrecisionMapper.h"

#include <unordered_map>

#include "faker-cxx/types/Precision.h"

namespace faker
{
const std::unordered_map<Precision, unsigned> PrecisionMapper::precisionToDecimalPlacesMapping{
Expand Down
3 changes: 3 additions & 0 deletions src/common/StringHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

#include <algorithm>
#include <cctype>
#include <cstddef>
#include <sstream>
#include <string>
#include <vector>

namespace faker
{
Expand Down
3 changes: 3 additions & 0 deletions src/modules/airline/Airline.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "faker-cxx/Airline.h"

#include <string>
#include <string_view>

#include "AirlineData.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
Expand Down
6 changes: 6 additions & 0 deletions src/modules/airline/AirlineData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#include "AirlineData.h"

#include <array>
#include <string_view>
#include <unordered_map>

#include "faker-cxx/Airline.h"

namespace faker
{
const std::array<std::string_view, 3> aircraftTypes = {"regional", "narrowbody", "widebody"};
Expand Down
2 changes: 2 additions & 0 deletions src/modules/animal/Animal.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "faker-cxx/Animal.h"

#include <string_view>

#include "AnimalData.h"
#include "faker-cxx/Helper.h"

Expand Down
3 changes: 3 additions & 0 deletions src/modules/animal/AnimalData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "AnimalData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 8> bears = {"Giant panda", "Spectacled bear", "Sun bear", "Sloth bear",
Expand Down
4 changes: 3 additions & 1 deletion src/modules/book/Book.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "faker-cxx/Book.h"

#include <string>
#include <string_view>

#include "../../common/FormatHelper.h"
#include "BookData.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
#include "faker-cxx/String.h"

namespace faker
Expand Down
3 changes: 3 additions & 0 deletions src/modules/book/BookData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "BookData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 100> authors = {"Shakespeare, William",
Expand Down
4 changes: 4 additions & 0 deletions src/modules/color/Color.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#include "faker-cxx/Color.h"

#include <string>
#include <string_view>

#include "../../common/FormatHelper.h"
#include "ColorData.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
#include "faker-cxx/String.h"
#include "faker-cxx/types/Hex.h"

namespace faker
{
Expand Down
3 changes: 3 additions & 0 deletions src/modules/color/ColorData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "ColorData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 31> colors = {
Expand Down
6 changes: 6 additions & 0 deletions src/modules/commerce/Commerce.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#include "faker-cxx/Commerce.h"

#include <cmath>
#include <cstddef>
#include <string>
#include <string_view>

#include "../../common/FormatHelper.h"
#include "CommerceData.h"
#include "faker-cxx/Finance.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
#include "faker-cxx/String.h"

namespace faker
Expand Down
3 changes: 3 additions & 0 deletions src/modules/commerce/CommerceData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "CommerceData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 22> departments = {
Expand Down
4 changes: 4 additions & 0 deletions src/modules/company/Company.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include "faker-cxx/Company.h"

#include <string>
#include <string_view>

#include "../../common/FormatHelper.h"
#include "CompanyData.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
#include "faker-cxx/Person.h"

namespace faker
Expand Down
3 changes: 3 additions & 0 deletions src/modules/company/CompanyData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "CompanyData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 65> buzzAdjectives = {"clicks-and-mortar",
Expand Down
2 changes: 2 additions & 0 deletions src/modules/computer/Computer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "faker-cxx/Computer.h"

#include <string_view>

#include "ComputerData.h"
#include "faker-cxx/Helper.h"

Expand Down
3 changes: 3 additions & 0 deletions src/modules/computer/ComputerData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "ComputerData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 4> computerTypes = {"Desktop", "Laptop", "Mainframe", "Supercomputer"};
Expand Down
3 changes: 3 additions & 0 deletions src/modules/crypto/Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <ios>
#include <optional>
#include <sstream>
#include <string>

#include "faker-cxx/Word.h"

Expand Down
4 changes: 4 additions & 0 deletions src/modules/database/Database.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include "faker-cxx/Database.h"

#include <string>
#include <string_view>

#include "DatabaseData.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/String.h"
#include "faker-cxx/types/Hex.h"

namespace faker
{
Expand Down
3 changes: 3 additions & 0 deletions src/modules/database/DatabaseData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "DatabaseData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 7> collations = {"utf8_unicode_ci", "utf8_general_ci", "utf8_bin",
Expand Down
2 changes: 2 additions & 0 deletions src/modules/datatype/Datatype.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "faker-cxx/Datatype.h"

#include <cmath>

#include "faker-cxx/Number.h"

namespace faker
Expand Down
3 changes: 3 additions & 0 deletions src/modules/date/Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include <ctime>
#include <iomanip>
#include <sstream>
#include <stdexcept>
#include <string>
#include <string_view>

#include "../../common/FormatHelper.h"
#include "DateData.h"
Expand Down
3 changes: 3 additions & 0 deletions src/modules/date/DateData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "DateData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 12> monthNames = {
Expand Down
10 changes: 10 additions & 0 deletions src/modules/finance/Finance.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
#include "faker-cxx/Finance.h"

#include <cstddef>
#include <ios>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>

#include "../../common/FormatHelper.h"
#include "../../common/PrecisionMapper.h"
#include "faker-cxx/Date.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Number.h"
#include "faker-cxx/String.h"
#include "faker-cxx/types/Hex.h"
#include "faker-cxx/types/Precision.h"
#include "FinanceData.h"

namespace faker
Expand Down
7 changes: 7 additions & 0 deletions src/modules/finance/FinanceData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#include "FinanceData.h"

#include <array>
#include <string_view>
#include <unordered_map>
#include <vector>

#include "faker-cxx/Finance.h"

namespace faker
{
const std::array<Finance::BicCountry, 10> bicCountries{
Expand Down
2 changes: 2 additions & 0 deletions src/modules/food/Food.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "faker-cxx/Food.h"

#include <string_view>

#include "faker-cxx/Helper.h"
#include "FoodData.h"

Expand Down
3 changes: 3 additions & 0 deletions src/modules/food/FoodData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "FoodData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 47> alcoholicBeverages{
Expand Down
6 changes: 6 additions & 0 deletions src/modules/git/Git.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "faker-cxx/Git.h"

#include <cstddef>
#include <optional>
#include <string>

#include "../../common/FormatHelper.h"
#include "../../common/StringHelper.h"
#include "../date/DateData.h"
Expand All @@ -8,6 +12,8 @@
#include "faker-cxx/Number.h"
#include "faker-cxx/Person.h"
#include "faker-cxx/String.h"
#include "faker-cxx/types/Country.h"
#include "faker-cxx/types/Hex.h"
#include "faker-cxx/Word.h"

namespace faker
Expand Down
3 changes: 3 additions & 0 deletions src/modules/hacker/Hacker.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "faker-cxx/Hacker.h"

#include <string>
#include <string_view>

#include "../../common/StringHelper.h"
#include "faker-cxx/Helper.h"
#include "HackerData.h"
Expand Down
3 changes: 3 additions & 0 deletions src/modules/hacker/HackerData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "HackerData.h"

#include <array>
#include <string_view>

namespace faker
{
const std::array<std::string_view, 16> abbreviations = {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/helper/Helper.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include "faker-cxx/Helper.h"

#include <algorithm>
#include <cstddef>
#include <random>
#include <regex>
#include <string>

#include "../../common/LuhnCheck.h"
#include "../../common/StringHelper.h"
#include "faker-cxx/Number.h"

namespace faker
{
Expand Down
3 changes: 3 additions & 0 deletions src/modules/image/Image.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "faker-cxx/Image.h"

#include <array>
#include <optional>
#include <string>
#include <string_view>
#include <unordered_map>

#include "../../common/FormatHelper.h"
Expand Down
Loading

0 comments on commit 4b2ee27

Please sign in to comment.