gaodayue commented on a change in pull request #2792: Reformat BE code 1/7 URL: https://github.com/apache/incubator-doris/pull/2792#discussion_r368289151
########## File path: be/src/agent/utils.cpp ########## @@ -16,32 +16,33 @@ // under the License. #include "agent/utils.h" + #include <arpa/inet.h> -#include <cstdio> #include <errno.h> -#include <fstream> -#include <iostream> #include <netdb.h> #include <netinet/in.h> -#include <sstream> +#include <rapidjson/document.h> +#include <rapidjson/rapidjson.h> +#include <rapidjson/stringbuffer.h> +#include <rapidjson/writer.h> #include <sys/socket.h> #include <sys/wait.h> -#include <unistd.h> - -#include <boost/filesystem.hpp> #include <thrift/Thrift.h> #include <thrift/transport/TSocket.h> #include <thrift/transport/TTransportException.h> #include <thrift/transport/TTransportUtils.h> -#include <rapidjson/document.h> -#include <rapidjson/rapidjson.h> -#include <rapidjson/stringbuffer.h> -#include <rapidjson/writer.h> +#include <unistd.h> + +#include <boost/filesystem.hpp> +#include <cstdio> Review comment: Clang-format supports grouping includes via `IncludeCategories`. I think we can inherit [impala's style](https://github.com/apache/impala/blob/master/.clang-format), which is 1. The corresponding header files of .cpp (if any) 2. <*.h> which covers most C library 3. <*> which covers most C++ standard library 4. <*/*> which covers third-party libraries 5. "*" which covers doris's own header ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org