Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Reorder #include to comply with cpplint 1.5.0 #622

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/dmlc/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#ifndef DMLC_FILESYSTEM_H_
#define DMLC_FILESYSTEM_H_

#include <dmlc/logging.h>
#include <dmlc/io.h>
#include <algorithm>
#include <string>
#include <vector>
#include <random>
#include <dmlc/logging.h>
#include <dmlc/io.h>

/* platform specific headers */
#ifdef _WIN32
Expand Down
6 changes: 3 additions & 3 deletions include/dmlc/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
*/
#ifndef DMLC_LOGGING_H_
#define DMLC_LOGGING_H_
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <string>
#include <vector>
#include <stdexcept>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include "./base.h"

#if DMLC_LOG_STACK_TRACE
#include <cxxabi.h>
#include <sstream>
#include DMLC_EXECINFO_H
#endif

Expand Down
12 changes: 6 additions & 6 deletions include/dmlc/lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
#ifndef DMLC_LUA_H_
#define DMLC_LUA_H_

extern "C" {
#include <lua.h>
#include <luaT.h>
#include <lualib.h>
}

#include <string>
#include <stdexcept>
#include <tuple>
Expand All @@ -46,6 +40,12 @@ extern "C" {
#include <unordered_map>
#include <type_traits>

extern "C" {
#include <lua.h>
#include <luaT.h>
#include <lualib.h>
}

#include "./base.h"
#include "./logging.h"
#include "./thread_local.h"
Expand Down
6 changes: 3 additions & 3 deletions include/dmlc/thread_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#ifndef DMLC_THREAD_GROUP_H_
#define DMLC_THREAD_GROUP_H_

#include <dmlc/concurrentqueue.h>
#include <dmlc/blockingconcurrentqueue.h>
#include <dmlc/logging.h>
#include <string>
#include <mutex>
#include <utility>
Expand All @@ -17,6 +14,9 @@
#include <thread>
#include <unordered_set>
#include <unordered_map>
#include <dmlc/concurrentqueue.h>
#include <dmlc/blockingconcurrentqueue.h>
#include <dmlc/logging.h>
#if defined(DMLC_USE_CXX14) || __cplusplus > 201103L /* C++14 */
#include <shared_mutex>
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/data.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright by Contributors
#include <string>
#include <cstring>
#include <dmlc/base.h>
#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <dmlc/data.h>
#include <dmlc/registry.h>
#include <cstring>
#include <string>
#include "io/uri_spec.h"
#include "data/parser.h"
#include "data/basic_row_iter.h"
Expand Down
10 changes: 5 additions & 5 deletions src/data/csv_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#ifndef DMLC_DATA_CSV_PARSER_H_
#define DMLC_DATA_CSV_PARSER_H_

#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include <cmath>
#include <cstring>
#include <map>
#include <string>
#include <limits>
#include <cmath>
#include <cstring>
#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include "./row_block.h"
#include "./text_parser.h"

Expand Down
4 changes: 2 additions & 2 deletions src/data/disk_row_iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#ifndef DMLC_DATA_DISK_ROW_ITER_H_
#define DMLC_DATA_DISK_ROW_ITER_H_

#include <algorithm>
#include <string>
#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <dmlc/data.h>
#include <dmlc/timer.h>
#include <dmlc/threadediter.h>
#include <algorithm>
#include <string>
#include "./row_block.h"
#include "./libsvm_parser.h"

Expand Down
6 changes: 3 additions & 3 deletions src/data/libfm_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#ifndef DMLC_DATA_LIBFM_PARSER_H_
#define DMLC_DATA_LIBFM_PARSER_H_

#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include <map>
#include <string>
#include <limits>
#include <algorithm>
#include <cstring>
#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include "./row_block.h"
#include "./text_parser.h"

Expand Down
6 changes: 3 additions & 3 deletions src/data/libsvm_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#ifndef DMLC_DATA_LIBSVM_PARSER_H_
#define DMLC_DATA_LIBSVM_PARSER_H_

#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include <map>
#include <string>
#include <limits>
#include <algorithm>
#include <cstring>
#include <dmlc/data.h>
#include <dmlc/strtonum.h>
#include <dmlc/parameter.h>
#include "./row_block.h"
#include "./text_parser.h"

Expand Down
2 changes: 1 addition & 1 deletion src/data/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#ifndef DMLC_DATA_PARSER_H_
#define DMLC_DATA_PARSER_H_

#include <vector>
#include <dmlc/base.h>
#include <dmlc/logging.h>
#include <dmlc/threadediter.h>
#include <vector>
#include "./row_block.h"

namespace dmlc {
Expand Down
8 changes: 4 additions & 4 deletions src/data/row_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#ifndef DMLC_DATA_ROW_BLOCK_H_
#define DMLC_DATA_ROW_BLOCK_H_

#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <dmlc/data.h>
#include <cstring>
#include <vector>
#include <limits>
#include <algorithm>
#include <cstring>
#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <dmlc/data.h>

namespace dmlc {
namespace data {
Expand Down
8 changes: 4 additions & 4 deletions src/data/text_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#ifndef DMLC_DATA_TEXT_PARSER_H_
#define DMLC_DATA_TEXT_PARSER_H_

#include <dmlc/data.h>
#include <dmlc/omp.h>
#include <dmlc/common.h>
#include <algorithm>
#include <thread>
#include <mutex>
#include <vector>
#include <cstring>
#include <algorithm>
#include <dmlc/data.h>
#include <dmlc/omp.h>
#include <dmlc/common.h>
#include "./row_block.h"
#include "./parser.h"

Expand Down
2 changes: 1 addition & 1 deletion src/io.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright by Contributors

#include <cstring>
#include <dmlc/base.h>
#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <cstring>
#include "io/uri_spec.h"
#include "io/line_split.h"
#include "io/recordio_split.h"
Expand Down
2 changes: 1 addition & 1 deletion src/io/azure_filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#ifndef DMLC_IO_AZURE_FILESYS_H_
#define DMLC_IO_AZURE_FILESYS_H_

#include <dmlc/filesystem.h>
#include <vector>
#include <string>
#include <dmlc/filesystem.h>

namespace dmlc {
namespace io {
Expand Down
4 changes: 2 additions & 2 deletions src/io/cached_input_split.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#ifndef DMLC_IO_CACHED_INPUT_SPLIT_H_
#define DMLC_IO_CACHED_INPUT_SPLIT_H_

#include <string>
#include <algorithm>
#include <dmlc/base.h>
// this code depends on c++11

#if DMLC_ENABLE_STD_THREAD
#include <dmlc/threadediter.h>
#include <string>
#include <algorithm>
#include "./input_split_base.h"

namespace dmlc {
Expand Down
2 changes: 1 addition & 1 deletion src/io/filesys.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright by Contributors

#include <dmlc/filesystem.h>
#include <queue>
#include <dmlc/filesystem.h>

namespace dmlc {
namespace io {
Expand Down
2 changes: 1 addition & 1 deletion src/io/hdfs_filesys.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright by Contributors
#include <dmlc/logging.h>
#include <algorithm>
#include <limits>
#include <dmlc/logging.h>
#include "./hdfs_filesys.h"

namespace dmlc {
Expand Down
6 changes: 3 additions & 3 deletions src/io/hdfs_filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*/
#ifndef DMLC_IO_HDFS_FILESYS_H_
#define DMLC_IO_HDFS_FILESYS_H_
#include <vector>
#include <string>

extern "C" {
#include <hdfs.h>
}
#include <dmlc/filesystem.h>

#include <vector>
#include <string>

namespace dmlc {
namespace io {
/*! \brief HDFS file system */
Expand Down
4 changes: 2 additions & 2 deletions src/io/indexed_recordio_split.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright by Contributors
#include <algorithm>
#include <fstream>
#include <dmlc/recordio.h>
#include <dmlc/logging.h>
#include <dmlc/io.h>
#include <algorithm>
#include <fstream>
#include "./indexed_recordio_split.h"

namespace dmlc {
Expand Down
8 changes: 4 additions & 4 deletions src/io/indexed_recordio_split.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#ifndef DMLC_IO_INDEXED_RECORDIO_SPLIT_H_
#define DMLC_IO_INDEXED_RECORDIO_SPLIT_H_

#include <dmlc/io.h>
#include <dmlc/recordio.h>
#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <utility>
#include <random>
#include <cstdio>
#include <cstring>
#include <dmlc/io.h>
#include <dmlc/recordio.h>
#include "./input_split_base.h"

namespace dmlc {
Expand Down
2 changes: 1 addition & 1 deletion src/io/input_split_base.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright by Contributors
#include <algorithm>
#include <dmlc/logging.h>
#include <dmlc/common.h>
#include <algorithm>
#include "./line_split.h"

#if DMLC_USE_REGEX
Expand Down
8 changes: 4 additions & 4 deletions src/io/input_split_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#ifndef DMLC_IO_INPUT_SPLIT_BASE_H_
#define DMLC_IO_INPUT_SPLIT_BASE_H_

#include <dmlc/io.h>
#include <dmlc/filesystem.h>
#include <cstdio>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <dmlc/io.h>
#include <dmlc/filesystem.h>

namespace dmlc {
namespace io {
Expand Down
2 changes: 1 addition & 1 deletion src/io/line_split.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright by Contributors
#include <algorithm>
#include <dmlc/io.h>
#include <dmlc/logging.h>
#include <algorithm>
#include "./line_split.h"

namespace dmlc {
Expand Down
2 changes: 1 addition & 1 deletion src/io/line_split.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#ifndef DMLC_IO_LINE_SPLIT_H_
#define DMLC_IO_LINE_SPLIT_H_

#include <dmlc/io.h>
#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <dmlc/io.h>
#include "./input_split_base.h"

namespace dmlc {
Expand Down
6 changes: 3 additions & 3 deletions src/io/local_filesys.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright by Contributors

#include <dmlc/base.h>
#include <dmlc/logging.h>
#include <errno.h>
extern "C" {
#include <errno.h>
#include <sys/stat.h>
}
#include <dmlc/base.h>
#include <dmlc/logging.h>
#ifndef _WIN32
extern "C" {
#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion src/io/local_filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#ifndef DMLC_IO_LOCAL_FILESYS_H_
#define DMLC_IO_LOCAL_FILESYS_H_

#include <dmlc/filesystem.h>
#include <vector>
#include <dmlc/filesystem.h>

namespace dmlc {
namespace io {
Expand Down
Loading