Skip to content

Commit

Permalink
fix the clang-format header order patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
ggeorgiev committed May 28, 2016
1 parent 29a6af6 commit 44271e4
Show file tree
Hide file tree
Showing 31 changed files with 70 additions and 58 deletions.
56 changes: 34 additions & 22 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -46,51 +46,63 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"engine/*.'
- Regex: '^"engine/.*'
Priority: 0
- Regex: '^"tool/*.'
- Regex: '^"tool/.*'
Priority: 10
- Regex: '^"task/*.'

- Regex: '^"task/[^/]*$'
Priority: 21
- Regex: '^"task/.*'
Priority: 20
- Regex: '^"tpool/*.'

- Regex: '^"tpool/.*'
Priority: 30
- Regex: '^"parser/*.'
- Regex: '^"parser/.*'
Priority: 40
- Regex: '^"dom/*.'

- Regex: '^"dom/[^/]*$'
Priority: 51
- Regex: '^"dom/.*'
Priority: 50
- Regex: '^"option/*.'

- Regex: '^"option/.*'
Priority: 60
- Regex: '^"doim/*.'

- Regex: '^"doim/[^/]*$'
Priority: 71
- Regex: '^"doim/.*'
Priority: 70
- Regex: '^"dp/*.'

- Regex: '^"dp/.*'
Priority: 80
- Regex: '^"db/*.'
- Regex: '^"db/.*'
Priority: 90
- Regex: '^"err/*.'
- Regex: '^"err/.*'
Priority: 90
- Regex: '^"log/*.'
- Regex: '^"log/.*'
Priority: 100
- Regex: '^"im/*.'
- Regex: '^"im/.*'
Priority: 100
- Regex: '^"const/*.'
- Regex: '^"const/.*'
Priority: 110
- Regex: '^"rtti/*.'
- Regex: '^"rtti/.*'
Priority: 110
- Regex: '^"gtest/*.'
- Regex: '^"gtest/.*'
Priority: 120
- Regex: '^<gtest/*.'
- Regex: '^<gtest/.*'
Priority: 130
#Note: that cppformat has to be on top of spdlog, even the real dependency is the opposite
# we need this to be able to override the internal version of spdlog
- Regex: '^<fmt/*.'
- Regex: '^<fmt/.*'
Priority: 140
- Regex: '^<spdlog/details/*.'
- Regex: '^<spdlog/details/.*'
Priority: 151
- Regex: '^<spdlog/*.'
- Regex: '^<spdlog/.*'
Priority: 150
- Regex: '^<boost/*.'
- Regex: '^<boost/.*'
Priority: 150
- Regex: '^<rocksdb/*.'
- Regex: '^<rocksdb/.*'
Priority: 150
- Regex: '^".*"$'
Priority: 1000
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#pragma once

#include "doim/cxx/cxx_include_directory.h"
#include "doim/element.hpp"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#pragma once

#include "doim/cxx/cxx_include_directory.h"
#include "doim/element.hpp"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <iosfwd>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_include_directory.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "doim/element.hpp"
#include "doim/fs/fs_directory.h"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include "err/err.h"
#include <iosfwd>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_object_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#pragma once

#include "doim/cxx/cxx_file.h"
#include "doim/element.hpp"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "doim/cxx/cxx_object_file.h"
#include "doim/cxx/cxx_static_library.h"
#include "doim/element.hpp"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/cxx/cxx_static_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "doim/element.hpp"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/fs/fs_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "doim/element.hpp"
#include "doim/fs/fs_directory.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <str>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/generic/attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "doim/element.hpp"
#include "doim/generic/attribute_name.h"
#include "doim/generic/attribute_value.h"
#include "doim/element.hpp"
#include "doim/set.hpp"
#include <memory>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/generic/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "doim/element.hpp"
#include "doim/generic/location.hpp"
#include "doim/element.hpp"
#include <memory>
#include <str>
#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/sys/sys_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//

#include "doim/sys/sys_command.h"
#include "doim/set.hpp"
#include "doim/sys/sys_argument.h"
#include "doim/set.hpp"
#include "err/err_assert.h"
#include <algorithm>
#include <functional>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/sys/sys_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "doim/element.hpp"
#include "doim/sys/sys_argument.h"
#include "doim/sys/sys_executable.h"
#include "doim/element.hpp"
#include "dp/simple_memoization.hpp"
#include <memory>
#include <str>
Expand Down
2 changes: 1 addition & 1 deletion src/doim/sys/sys_executable.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "doim/element.hpp"
#include "doim/fs/fs_binary.h"
#include "doim/fs/fs_file.h"
#include "doim/element.hpp"
#include <memory>
#include <str>

Expand Down
4 changes: 2 additions & 2 deletions src/engine/cxx_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
#include "task/cxx/cxx_object_file_crc_task.h"
#include "task/cxx/cxx_program_crc_task.h"
#include "task/db/db_put_task.h"
#include "task/manager.h"
#include "task/sys/parse_stdout_task.h"
#include "task/manager.h"
#include "task/tpool.h"
#include "tpool/task_callback.h"
#include "tpool/task_group.h"
#include "doim/cxx/cxx_program.h"
#include "doim/fs/fs_file.h"
#include "doim/set.hpp"
#include "doim/sys/sys_command.h"
#include "doim/set.hpp"
#include "db/database.h"
#include "err/err.h"
#include "im/initialization_manager.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/task/cxx/cxx_file_crc_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "task/base.hpp"
#include "task/cxx/cxx_crc_task_mixin.h"
#include "task/element.hpp"
#include "doim/cxx/cxx_file.h"
#include "doim/tag/tag.h"
#include "err/err.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/cxx/cxx_header_crc_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "task/base.hpp"
#include "task/cxx/cxx_crc_task_mixin.h"
#include "task/element.hpp"
#include "doim/cxx/cxx_header.h"
#include "doim/cxx/cxx_include_directory.h"
#include "doim/tag/tag.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/cxx/cxx_object_file_crc_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/cxx/cxx_object_file.h"
#include "doim/tag/tag.h"
#include "err/err.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/cxx/cxx_program_crc_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/cxx/cxx_program.h"
#include "doim/tag/tag.h"
#include "err/err.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/db/db_put_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/db/db_key.h"
#include "doim/db/db_value.hpp"
#include "doim/tag/tag.h"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/task/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

#pragma once

#include "task/base.hpp"
#include "task/cxx/cxx_file_crc_task.h"
#include "task/cxx/cxx_header_crc_task.h"
#include "task/cxx/cxx_object_file_crc_task.h"
#include "task/cxx/cxx_program_crc_task.h"
#include "task/sys/ensure_directory_task.h"
#include "task/sys/execute_command_task.h"
#include "task/sys/parse_stdout_task.h"
#include "task/element.hpp"
#include "im/initialization_manager.hpp"
#include <mutex>
#include <mutex> // IWYU pragma: keep
#include <shared_ptr>
#include <unordered>

Expand Down
2 changes: 1 addition & 1 deletion src/task/sys/ensure_directory_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/fs/fs_directory.h"
#include "err/err.h"
#include <fmt/format.h>
Expand Down
2 changes: 1 addition & 1 deletion src/task/sys/execute_command_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//

#include "task/sys/execute_command_task.h"
#include "task/manager.h"
#include "task/sys/ensure_directory_task.h"
#include "task/manager.h"
#include "task/tpool.h"

#include "db/database.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/sys/execute_command_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/fs/fs_directory.h"
#include "doim/sys/sys_command.h"
#include "doim/tag/tag.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/sys/parse_stdout_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//

#include "task/sys/parse_stdout_task.h"
#include "task/manager.h"
#include "task/sys/execute_command_task.h"
#include "task/manager.h"
#include "task/tpool.h"

#include "err/err_assert.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/sys/parse_stdout_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "task/base.hpp"
#include "task/element.hpp"
#include "doim/fs/fs_directory.h"
#include "doim/sys/sys_command.h"
#include "err/err.h"
Expand Down
2 changes: 1 addition & 1 deletion src/task/task.dbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cxx_library task
@visibility=public
@directory=..:

task/base.hpp
task/element.hpp
task/cxx/cxx_crc_task_mixin.h
task/cxx/cxx_file_crc_task.h
task/cxx/cxx_header_crc_task.h
Expand Down
4 changes: 2 additions & 2 deletions src/tool/cxx_clang_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//

#include "tool/cxx_clang_format.h"
#include "task/manager.h"
#include "task/sys/parse_stdout_task.h"
#include "task/manager.h"
#include "doim/cxx/cxx_file.h"
#include "doim/fs/fs_file.h"
#include "doim/set.hpp"
#include "doim/sys/sys_command.h"
#include "doim/set.hpp"
#include "rtti/class_rtti.hpp"
#include <memory>
#include <str>
Expand Down
2 changes: 1 addition & 1 deletion src/tool/cxx_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "doim/cxx/cxx_file.h"
#include "doim/cxx/cxx_static_library.h"
#include "doim/fs/fs_file.h"
#include "doim/set.hpp"
#include "doim/sys/sys_argument.h"
#include "doim/sys/sys_command.h"
#include "doim/set.hpp"
#include <memory>
#include <str>

Expand Down
4 changes: 2 additions & 2 deletions src/tool/cxx_iwyu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

#include "tool/cxx_iwyu.h"
#include "tool/cxx_compiler.h"
#include "task/manager.h"
#include "task/sys/parse_stdout_task.h"
#include "task/manager.h"
#include "doim/cxx/cxx_file.h"
#include "doim/cxx/cxx_header.h"
#include "doim/cxx/cxx_include_directory.h"
#include "doim/fs/fs_file.h"
#include "doim/set.hpp"
#include "doim/sys/sys_argument.h"
#include "doim/sys/sys_command.h"
#include "doim/set.hpp"
#include "err/err.h"
#include "log/log.h"
#include "rtti/class_rtti.hpp"
Expand Down
Loading

0 comments on commit 44271e4

Please sign in to comment.