Skip to content

Commit

Permalink
Adjust #include groups
Browse files Browse the repository at this point in the history
Some standard headers include '_' (e.g. string_view) in the name, which
was not considered in the clang-format grouping. The configuration file
has been corrected, and formatting applied consistently to all project
source files.
  • Loading branch information
marcosbento committed Dec 19, 2023
1 parent b4f9b99 commit 2f45b2d
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ IncludeBlocks: Regroup
IncludeCategories:
# By default, first include the 'main' header file related to source file
# Then include every 'system' headers (i.e. in <>)
- Regex: '<[^Q][[:alnum:]]+(\.h)?>'
- Regex: '<[^Q][[:alnum:]_]+(\.h)?>'
Priority: 10
# Then include '3rd party' headers
- Regex: '<[[:alnum:]/._]+>'
Expand Down
2 changes: 1 addition & 1 deletion ACore/src/ecflow/core/Str.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <cstring>
#include <limits>
#include <string>
#include <string_view>
#include <vector>

#include <boost/algorithm/string.hpp>
#include <string_view>

namespace ecf {

Expand Down
3 changes: 1 addition & 2 deletions ACore/src/ecflow/core/StringSplitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
#define ecflow_core_StringSplitter_HPP

#include <string>
#include <vector>

#include <string_view>
#include <vector>

namespace ecf {

Expand Down
3 changes: 1 addition & 2 deletions ACore/src/ecflow/core/WhiteListFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
///

#include <string>
#include <vector>

#include <unordered_map>
#include <vector>

// ----------------------------------------------------------------
// The whiteList file, is used to indicate users who are allowed
Expand Down
3 changes: 2 additions & 1 deletion ACore/src/ecflow/core/cereal_optional_nvp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
/// };
///

#include <type_traits> // for std::enable_if_t

#include <cereal/cereal.hpp>
#include <cereal/details/traits.hpp>
#include <type_traits> // for std::enable_if_t

namespace cereal {
class JSONInputArchive;
Expand Down
3 changes: 1 addition & 2 deletions ANode/src/ecflow/node/Defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
#include <cstdint>
#include <iosfwd>
#include <set>
#include <vector>

#include <unordered_map>
#include <vector>

#include "ecflow/core/NOrder.hpp"
#include "ecflow/core/NState.hpp"
Expand Down
1 change: 0 additions & 1 deletion ANode/src/ecflow/node/ExprDuplicate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "ecflow/node/ExprDuplicate.hpp"

#include <iostream>

#include <unordered_map>

#include "ecflow/core/Ecf.hpp"
Expand Down
3 changes: 1 addition & 2 deletions ANode/src/ecflow/node/parser/DefsStructureParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

#include <stack>
#include <string>
#include <vector>

#include <unordered_map>
#include <vector>

#include "ecflow/core/File_r.hpp"
#include "ecflow/core/PrintStyle.hpp"
Expand Down
3 changes: 1 addition & 2 deletions ANode/src/ecflow/node/parser/Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

#include <stack>
#include <string>
#include <vector>

#include <unordered_map>
#include <vector>

class DefsStructureParser;
class Node;
Expand Down
2 changes: 1 addition & 1 deletion Base/src/ecflow/base/cts/ClientToServerCmd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "ecflow/base/Cmd.hpp"
#include "ecflow/core/PrintStyle.hpp"
#include "ecflow/node/NodeFwd.hpp"
#include "ecflow/core/Serialization.hpp"
#include "ecflow/node/NodeFwd.hpp"

class AbstractServer;
class AbstractClientEnv;
Expand Down
3 changes: 1 addition & 2 deletions Http/src/ecflow/http/ApiV1Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

#include "ecflow/http/ApiV1Impl.hpp"

#include <condition_variable>
#include <mutex>
#include <string>
#include <thread>

#include <condition_variable>

#include "ecflow/core/Child.hpp"
#include "ecflow/core/Converter.hpp"
#include "ecflow/core/Str.hpp"
Expand Down
2 changes: 1 addition & 1 deletion Http/src/ecflow/http/TokenStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#include <atomic> // shared mutex only with c++14
#include <fstream>
#include <iomanip>
#include <shared_mutex>
#include <sstream>
#include <thread>

#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
#include <shared_mutex>

#include "ecflow/core/Filesystem.hpp"
#include "ecflow/core/Str.hpp"
Expand Down
3 changes: 1 addition & 2 deletions Udp/src/ecflow/udp/UDPServerEnvironment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

#include <optional>
#include <string>
#include <vector>

#include <unordered_map>
#include <vector>

#include "ecflow/core/Converter.hpp"

Expand Down

0 comments on commit 2f45b2d

Please sign in to comment.