LightGBM: fix cpp lint problems
Style guide ref: http://google.github.io/styleguide/cppguide.html.
90127b526be8b13bdf840effacde9e61fa765a6f
Total errors found: 853
pip install cpplint
cpplint --linelength=999 --recursive ./src ./include
Report (Clickable):
./include\LightGBM\json11.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\json11.hpp:80: public: should be indented +1 space inside class Json [whitespace/indent] [3]
./include\LightGBM\json11.hpp:92: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:93: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:94: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:95: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:96: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:97: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:98: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:99: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:100: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:101: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:102: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:106: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:113: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:119: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:123: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\json11.hpp:156: Is this a non-const reference? If so, make const or use a pointer: std::string &out [runtime/references] [2]
./include\LightGBM\json11.hpp:165: Is this a non-const reference? If so, make const or use a pointer: std::string & err [runtime/references] [2]
./include\LightGBM\json11.hpp:168: Is this a non-const reference? If so, make const or use a pointer: std::string & err [runtime/references] [2]
./include\LightGBM\json11.hpp:180: Is this a non-const reference? If so, make const or use a pointer: std::string::size_type & parser_stop_pos [runtime/references] [2]
./include\LightGBM\json11.hpp:181: Is this a non-const reference? If so, make const or use a pointer: std::string & err [runtime/references] [2]
./include\LightGBM\json11.hpp:186: Is this a non-const reference? If so, make const or use a pointer: std::string & err [runtime/references] [2]
./include\LightGBM\json11.hpp:205: Is this a non-const reference? If so, make const or use a pointer: std::string & err [runtime/references] [2]
./include\LightGBM\json11.hpp:207: private: should be indented +1 space inside class Json [whitespace/indent] [3]
./include\LightGBM\json11.hpp:213: protected: should be indented +1 space inside class JsonValue [whitespace/indent] [3]
./include\LightGBM\json11.hpp:220: Is this a non-const reference? If so, make const or use a pointer: std::string &out [runtime/references] [2]
./include\LightGBM\json11.hpp:204: Add #include <utility> for pair<> [build/include_what_you_use] [4]
Done processing ./include\LightGBM\json11.hpp
./include\LightGBM\prediction_early_stop.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\prediction_early_stop.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_PREDICTION_EARLY_STOP_H_ [build/header_guard] [5]
./include\LightGBM\prediction_early_stop.h:32: #endif line should be "#endif // INCLUDE_LIGHTGBM_PREDICTION_EARLY_STOP_H_" [build/header_guard] [5]
./include\LightGBM\prediction_early_stop.h:7: Found C system header after C++ system header. Should be: prediction_early_stop.h, c system, c++ system, other. [build/include_
Done processing ./include\LightGBM\prediction_early_stop.h
./src\boosting\prediction_early_stop.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\prediction_early_stop.cpp:11: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
Done processing ./src\boosting\prediction_early_stop.cpp
./include\LightGBM\utils\threading.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\threading.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_THREADING_H_ [build/header_guard] [5]
./include\LightGBM\utils\threading.h:41: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_THREADING_H_" [build/header_guard] [5]
./include\LightGBM\utils\threading.h:12: public: should be indented +1 space inside class Threading [whitespace/indent] [3]
Done processing ./include\LightGBM\utils\threading.h
./src\objective\multiclass_objective.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\objective\multiclass_objective.hpp:1: #ifndef header guard has wrong style, please use: SRC_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_ [build/header_guard] [5]
./src\objective\multiclass_objective.hpp:259: #endif line should be "#endif // SRC_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_" [build/header_guard] [5]
./src\objective\multiclass_objective.hpp:17: public: should be indented +1 space inside class MulticlassSoftmax [whitespace/indent] [3]
./src\objective\multiclass_objective.hpp:149: private: should be indented +1 space inside class MulticlassSoftmax [whitespace/indent] [3]
./src\objective\multiclass_objective.hpp:167: public: should be indented +1 space inside class MulticlassOVA [whitespace/indent] [3]
./src\objective\multiclass_objective.hpp:249: private: should be indented +1 space inside class MulticlassOVA [whitespace/indent] [3]
./src\objective\multiclass_objective.hpp:137: Add #include <algorithm> for max [build/include_what_you_use] [4]
./src\objective\multiclass_objective.hpp:225: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\objective\multiclass_objective.hpp
./src\boosting\boosting.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\boosting.cpp:2: Include the directory when naming .h files [build/include_subdir] [4]
Done processing ./src\boosting\boosting.cpp
./src\objective\regression_objective.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\objective\regression_objective.hpp:1: #ifndef header guard has wrong style, please use: SRC_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_ [build/header_guard] [5]
./src\objective\regression_objective.hpp:810: #endif line should be "#endif // SRC_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_" [build/header_guard] [5]
./src\objective\regression_objective.hpp:68: public: should be indented +1 space inside class RegressionL2loss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:164: protected: should be indented +1 space inside class RegressionL2loss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:179: public: should be indented +1 space inside class RegressionL1loss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:297: public: should be indented +1 space inside class RegressionHuberLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:351: private: should be indented +1 space inside class RegressionHuberLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:359: public: should be indented +1 space inside class RegressionFairLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:396: private: should be indented +1 space inside class RegressionFairLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:406: public: should be indented +1 space inside class RegressionPoissonLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:429: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\objective\regression_objective.hpp:480: private: should be indented +1 space inside class RegressionPoissonLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:486: public: should be indented +1 space inside class RegressionQuantileloss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:606: private: should be indented +1 space inside class RegressionQuantileloss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:615: public: should be indented +1 space inside class RegressionMAPELOSS [whitespace/indent] [3]
./src\objective\regression_objective.hpp:724: private: should be indented +1 space inside class RegressionMAPELOSS [whitespace/indent] [3]
./src\objective\regression_objective.hpp:734: public: should be indented +1 space inside class RegressionGammaLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:769: public: should be indented +1 space inside class RegressionTweedieLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:802: private: should be indented +1 space inside class RegressionTweedieLoss [whitespace/indent] [3]
./src\objective\regression_objective.hpp:641: Add #include <algorithm> for max [build/include_what_you_use] [4]
./src\objective\regression_objective.hpp:774: Add #include <string> for string [build/include_what_you_use] [4]
./src\objective\regression_objective.hpp:774: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./src\objective\regression_objective.hpp
./src\io\metadata.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Done processing ./src\io\metadata.cpp
./src\io\dataset.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\dataset.cpp:7: <chrono> is an unapproved C++11 header. [build/c++11] [5]
./src\io\dataset.cpp:27: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\dataset.cpp:60: Is this a non-const reference? If so, make const or use a pointer: std::vector<bool>& mark [runtime/references] [2]
./src\io\dataset.cpp:138: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::unique_ptr<BinMapper>>& bin_mappers [runtime/references] [2]
./src\io\dataset.cpp:748: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
./src\io\dataset.cpp:777: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
./src\io\dataset.cpp:810: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
./src\io\dataset.cpp:838: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
Done processing ./src\io\dataset.cpp
./src\treelearner\parallel_tree_learner.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\parallel_tree_learner.h:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_PARALLEL_TREE_LEARNER_H_ [build/header_guard] [5]
./src\treelearner\parallel_tree_learner.h:211: #endif line should be "#endif // SRC_TREELEARNER_PARALLEL_TREE_LEARNER_H_" [build/header_guard] [5]
./src\treelearner\parallel_tree_learner.h:4: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\parallel_tree_learner.h:5: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\parallel_tree_learner.h:6: Found C system header after other header. Should be: parallel_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\parallel_tree_learner.h:8: Found C system header after other header. Should be: parallel_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\parallel_tree_learner.h:10: Found C++ system header after other header. Should be: parallel_tree_learner.h, c system, c++ system, other. [build/include_ord
./src\treelearner\parallel_tree_learner.h:11: Found C++ system header after other header. Should be: parallel_tree_learner.h, c system, c++ system, other. [build/include_ord
./src\treelearner\parallel_tree_learner.h:12: Found C++ system header after other header. Should be: parallel_tree_learner.h, c system, c++ system, other. [build/include_ord
./src\treelearner\parallel_tree_learner.h:23: public: should be indented +1 space inside class FeatureParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:28: protected: should be indented +1 space inside class FeatureParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:31: private: should be indented +1 space inside class FeatureParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:49: public: should be indented +1 space inside class DataParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:55: protected: should be indented +1 space inside class DataParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:69: private: should be indented +1 space inside class DataParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:103: public: should be indented +1 space inside class VotingParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:109: protected: should be indented +1 space inside class VotingParallelTreeLearner [whitespace/indent] [3]
./src\treelearner\parallel_tree_learner.h:139: private: should be indented +1 space inside class VotingParallelTreeLearner [whitespace/indent] [3]
Done processing ./src\treelearner\parallel_tree_learner.h
./src\treelearner\leaf_splits.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\leaf_splits.hpp:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_LEAF_SPLITS_HPP_ [build/header_guard] [5]
./src\treelearner\leaf_splits.hpp:162: #endif line should be "#endif // SRC_TREELEARNER_LEAF_SPLITS_HPP_" [build/header_guard] [5]
./src\treelearner\leaf_splits.hpp:6: Found C system header after C++ system header. Should be: leaf_splits.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\leaf_splits.hpp:9: Found C++ system header after other header. Should be: leaf_splits.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\leaf_splits.hpp:17: public: should be indented +1 space inside class LeafSplits [whitespace/indent] [3]
./src\treelearner\leaf_splits.hpp:18: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./src\treelearner\leaf_splits.hpp:144: private: should be indented +1 space inside class LeafSplits [whitespace/indent] [3]
Done processing ./src\treelearner\leaf_splits.hpp
./include\LightGBM\utils\log.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\log.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_LOG_H_ [build/header_guard] [5]
./include\LightGBM\utils\log.h:103: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_LOG_H_" [build/header_guard] [5]
./include\LightGBM\utils\log.h:44: public: should be indented +1 space inside class Log [whitespace/indent] [3]
./include\LightGBM\utils\log.h:86: private: should be indented +1 space inside class Log [whitespace/indent] [3]
./include\LightGBM\utils\log.h:83: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./include\LightGBM\utils\log.h
./include\LightGBM\utils\pipeline_reader.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\pipeline_reader.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_PIPELINE_READER_H_ [build/header_guard] [5]
./include\LightGBM\utils\pipeline_reader.h:67: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_PIPELINE_READER_H_" [build/header_guard] [5]
./include\LightGBM\utils\pipeline_reader.h:9: <thread> is an unapproved C++11 header. [build/c++11] [5]
./include\LightGBM\utils\pipeline_reader.h:13: Include the directory when naming .h files [build/include_subdir] [4]
./include\LightGBM\utils\pipeline_reader.h:21: public: should be indented +1 space inside class PipelineReader [whitespace/indent] [3]
./include\LightGBM\utils\pipeline_reader.h:58: Add #include <utility> for swap [build/include_what_you_use] [4]
Done processing ./include\LightGBM\utils\pipeline_reader.h
./src\treelearner\serial_tree_learner.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\serial_tree_learner.h:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_SERIAL_TREE_LEARNER_H_ [build/header_guard] [5]
./src\treelearner\serial_tree_learner.h:183: #endif line should be "#endif // SRC_TREELEARNER_SERIAL_TREE_LEARNER_H_" [build/header_guard] [5]
./src\treelearner\serial_tree_learner.h:16: Found C++ system header after other header. Should be: serial_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\serial_tree_learner.h:17: Found C++ system header after other header. Should be: serial_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\serial_tree_learner.h:18: Found C++ system header after other header. Should be: serial_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\serial_tree_learner.h:19: Found C++ system header after other header. Should be: serial_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\serial_tree_learner.h:20: Found C++ system header after other header. Should be: serial_tree_learner.h, c system, c++ system, other. [build/include_order]
./src\treelearner\serial_tree_learner.h:27: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
./src\treelearner\serial_tree_learner.h:35: public: should be indented +1 space inside class SerialTreeLearner [whitespace/indent] [3]
./src\treelearner\serial_tree_learner.h:78: protected: should be indented +1 space inside class SerialTreeLearner [whitespace/indent] [3]
./src\treelearner\serial_tree_learner.h:105: Is this a non-const reference? If so, make const or use a pointer: Json& forced_split_json [runtime/references] [2]
Done processing ./src\treelearner\serial_tree_learner.h
./include\LightGBM\lightgbm_R.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\lightgbm_R.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_LIGHTGBM_R_H_ [build/header_guard] [5]
./include\LightGBM\lightgbm_R.h:525: #endif line should be "#endif // INCLUDE_LIGHTGBM_LIGHTGBM_R_H_" [build/header_guard] [5]
./include\LightGBM\lightgbm_R.h:7: Found C system header after C++ system header. Should be: lightgbm_R.h, c system, c++ system, other. [build/include_order] [4]
Done processing ./include\LightGBM\lightgbm_R.h
./src\treelearner\gpu_tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\gpu_tree_learner.cpp:2: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\gpu_tree_learner.cpp:6: Found C system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.cpp:7: Found C system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.cpp:8: Found C system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.cpp:10: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.cpp:11: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.cpp:106: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:111: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:113: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:154: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:154: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:173: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:173: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:178: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:178: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:186: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:194: Using C-style cast. Use reinterpret_cast<HistType*>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:212: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:212: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:321: At least two spaces is best between code and comments [whitespace/comments] [2]
./src\treelearner\gpu_tree_learner.cpp:332: Using C-style cast. Use static_cast<double>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:334: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:341: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:341: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:356: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:363: Using C-style cast. Use reinterpret_cast<Feature4*>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:367: Using C-style cast. Use reinterpret_cast<Feature4*>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:372: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:414: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:414: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:426: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:426: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:433: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:433: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:438: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:438: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:473: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:473: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:477: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:477: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:487: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:487: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:495: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:495: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:499: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:499: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:513: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:513: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:675: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:675: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:708: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:710: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
./src\treelearner\gpu_tree_learner.cpp:723: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:723: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:729: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:729: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:735: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:735: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:785: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:785: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:819: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:819: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:915: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:915: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:928: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:928: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:948: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:948: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:985: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:985: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:1010: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:1010: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:1064: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\gpu_tree_learner.cpp:1064: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\treelearner\gpu_tree_learner.cpp:564: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\treelearner\gpu_tree_learner.cpp
./src\network\network.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\network\network.cpp:5: Include the directory when naming .h files [build/include_subdir] [4]
./src\network\network.cpp:7: Found C++ system header after other header. Should be: network.h, c system, c++ system, other. [build/include_order] [4]
./src\network\network.cpp:8: Found C++ system header after other header. Should be: network.h, c system, c++ system, other. [build/include_order] [4]
Done processing ./src\network\network.cpp
./src\boosting\score_updater.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\score_updater.hpp:1: #ifndef header guard has wrong style, please use: SRC_BOOSTING_SCORE_UPDATER_HPP_ [build/header_guard] [5]
./src\boosting\score_updater.hpp:123: #endif line should be "#endif // SRC_BOOSTING_SCORE_UPDATER_HPP_" [build/header_guard] [5]
./src\boosting\score_updater.hpp:18: public: should be indented +1 space inside class ScoreUpdater [whitespace/indent] [3]
./src\boosting\score_updater.hpp:112: private: should be indented +1 space inside class ScoreUpdater [whitespace/indent] [3]
./src\boosting\score_updater.hpp:118: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./src\boosting\score_updater.hpp
./src\io\dataset_loader.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\dataset_loader.cpp:394: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\dataset_loader.cpp:394: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\io\dataset_loader.cpp:417: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\dataset_loader.cpp:417: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Done processing ./src\io\dataset_loader.cpp
./include\LightGBM\dataset.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\dataset.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_DATASET_H_ [build/header_guard] [5]
./include\LightGBM\dataset.h:625: #endif line should be "#endif // INCLUDE_LIGHTGBM_DATASET_H_" [build/header_guard] [5]
./include\LightGBM\dataset.h:17: <mutex> is an unapproved C++11 header. [build/c++11] [5]
./include\LightGBM\dataset.h:37: public: should be indented +1 space inside class Metadata [whitespace/indent] [3]
./include\LightGBM\dataset.h:209: private: should be indented +1 space inside class Metadata [whitespace/indent] [3]
./include\LightGBM\dataset.h:250: public: should be indented +1 space inside class Parser [whitespace/indent] [3]
./include\LightGBM\dataset.h:279: public: should be indented +1 space inside class Dataset [whitespace/indent] [3]
./include\LightGBM\dataset.h:287: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::unique_ptr<BinMapper>>& bin_mappers [runtime/references
./include\LightGBM\dataset.h:401: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::unique_ptr<OrderedBin>>& ordered_bins [runtime/referenc
./include\LightGBM\dataset.h:584: private: should be indented +1 space inside class Dataset [whitespace/indent] [3]
Done processing ./include\LightGBM\dataset.h
./src\boosting\gbdt.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\gbdt.h:1: #ifndef header guard has wrong style, please use: SRC_BOOSTING_GBDT_H_ [build/header_guard] [5]
./src\boosting\gbdt.h:492: #endif line should be "#endif // SRC_BOOSTING_GBDT_H_" [build/header_guard] [5]
./src\boosting\gbdt.h:11: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:12: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:13: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:14: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:15: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:16: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:16: <mutex> is an unapproved C++11 header. [build/c++11] [5]
./src\boosting\gbdt.h:17: Found C++ system header after other header. Should be: gbdt.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\gbdt.h:19: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
./src\boosting\gbdt.h:27: public: should be indented +1 space inside class GBDT [whitespace/indent] [3]
./src\boosting\gbdt.h:137: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:173: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:180: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:268: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:276: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:355: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\boosting\gbdt.h:357: protected: should be indented +1 space inside class GBDT [whitespace/indent] [3]
./src\boosting\gbdt.h:381: Is this a non-const reference? If so, make const or use a pointer: Random& cur_rand [runtime/references] [2]
./src\boosting\gbdt.h:87: Add #include <utility> for swap [build/include_what_you_use] [4]
./src\boosting\gbdt.h:330: Add #include <algorithm> for min [build/include_what_you_use] [4]
Done processing ./src\boosting\gbdt.h
./src\boosting\dart.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\dart.hpp:1: #ifndef header guard has wrong style, please use: SRC_BOOSTING_DART_HPP_ [build/header_guard] [5]
./src\boosting\dart.hpp:205: #endif line should be "#endif // SRC_BOOSTING_DART_HPP_" [build/header_guard] [5]
./src\boosting\dart.hpp:6: Include the directory when naming .h files [build/include_subdir] [4]
./src\boosting\dart.hpp:8: Found C++ system header after other header. Should be: dart.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\dart.hpp:9: Found C++ system header after other header. Should be: dart.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\dart.hpp:10: Found C++ system header after other header. Should be: dart.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\dart.hpp:11: Found C++ system header after other header. Should be: dart.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\dart.hpp:18: public: should be indented +1 space inside class DART [whitespace/indent] [3]
./src\boosting\dart.hpp:87: private: should be indented +1 space inside class DART [whitespace/indent] [3]
./src\boosting\dart.hpp:112: Add #include <algorithm> for min [build/include_what_you_use] [4]
Done processing ./src\boosting\dart.hpp
./src\io\dense_nbits_bin.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\dense_nbits_bin.hpp:1: #ifndef header guard has wrong style, please use: SRC_IO_DENSE_NBITS_BIN_HPP_ [build/header_guard] [5]
./src\io\dense_nbits_bin.hpp:389: #endif line should be "#endif // SRC_IO_DENSE_NBITS_BIN_HPP_" [build/header_guard] [5]
./src\io\dense_nbits_bin.hpp:15: public: should be indented +1 space inside class Dense4bitsBinIterator [whitespace/indent] [3]
./src\io\dense_nbits_bin.hpp:29: private: should be indented +1 space inside class Dense4bitsBinIterator [whitespace/indent] [3]
./src\io\dense_nbits_bin.hpp:38: public: should be indented +1 space inside class Dense4bitsBin [whitespace/indent] [3]
./src\io\dense_nbits_bin.hpp:40: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./src\io\dense_nbits_bin.hpp:213: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\dense_nbits_bin.hpp:274: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\dense_nbits_bin.hpp:365: protected: should be indented +1 space inside class Dense4bitsBin [whitespace/indent] [3]
Done processing ./src\io\dense_nbits_bin.hpp
./include\LightGBM\utils\file_io.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\file_io.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_FILE_IO_H_ [build/header_guard] [5]
./include\LightGBM\utils\file_io.h:74: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_FILE_IO_H_" [build/header_guard] [5]
./include\LightGBM\utils\file_io.h:69: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./include\LightGBM\utils\file_io.h
./include\LightGBM\dataset_loader.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\dataset_loader.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_DATASET_LOADER_H_ [build/header_guard] [5]
./include\LightGBM\dataset_loader.h:78: #endif line should be "#endif // INCLUDE_LIGHTGBM_DATASET_LOADER_H_" [build/header_guard] [5]
./include\LightGBM\dataset_loader.h:9: public: should be indented +1 space inside class DatasetLoader [whitespace/indent] [3]
./include\LightGBM\dataset_loader.h:31: private: should be indented +1 space inside class DatasetLoader [whitespace/indent] [3]
./include\LightGBM\dataset_loader.h:47: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::string>& text_data [runtime/references] [2]
./include\LightGBM\dataset_loader.h:76: Namespace should be terminated with "// namespace LightGBM" [readability/namespace] [5]
./include\LightGBM\dataset_loader.h:71: Add #include <string> for string [build/include_what_you_use] [4]
./include\LightGBM\dataset_loader.h:71: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./include\LightGBM\dataset_loader.h
./src\objective\xentropy_objective.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\objective\xentropy_objective.hpp:1: #ifndef header guard has wrong style, please use: SRC_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_ [build/header_guard] [5]
./src\objective\xentropy_objective.hpp:269: #endif line should be "#endif // SRC_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_" [build/header_guard] [5]
./src\objective\xentropy_objective.hpp:39: public: should be indented +1 space inside class CrossEntropy [whitespace/indent] [3]
./src\objective\xentropy_objective.hpp:60: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\objective\xentropy_objective.hpp:130: private: should be indented +1 space inside class CrossEntropy [whitespace/indent] [3]
./src\objective\xentropy_objective.hpp:143: public: should be indented +1 space inside class CrossEntropyLambda [whitespace/indent] [3]
./src\objective\xentropy_objective.hpp:163: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\objective\xentropy_objective.hpp:254: private: should be indented +1 space inside class CrossEntropyLambda [whitespace/indent] [3]
./src\objective\xentropy_objective.hpp:124: Add #include <algorithm> for max [build/include_what_you_use] [4]
./src\objective\xentropy_objective.hpp:148: Add #include <vector> for vector<> [build/include_what_you_use] [4]
./src\objective\xentropy_objective.hpp:226: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\objective\xentropy_objective.hpp
./src\io\config.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\config.cpp:157: Use int16/int64/etc, rather than the C type short [runtime/int] [4]
Done processing ./src\io\config.cpp
./src\treelearner\gpu_tree_learner.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\gpu_tree_learner.h:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_GPU_TREE_LEARNER_H_ [build/header_guard] [5]
./src\treelearner\gpu_tree_learner.h:284: #endif line should be "#endif // SRC_TREELEARNER_GPU_TREE_LEARNER_H_" [build/header_guard] [5]
./src\treelearner\gpu_tree_learner.h:10: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\gpu_tree_learner.h:15: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.h:16: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.h:17: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.h:18: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.h:19: Found C++ system header after other header. Should be: gpu_tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\gpu_tree_learner.h:31: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
./src\treelearner\gpu_tree_learner.h:39: public: should be indented +1 space inside class GPUTreeLearner [whitespace/indent] [3]
./src\treelearner\gpu_tree_learner.h:60: protected: should be indented +1 space inside class GPUTreeLearner [whitespace/indent] [3]
./src\treelearner\gpu_tree_learner.h:67: private: should be indented +1 space inside class GPUTreeLearner [whitespace/indent] [3]
./src\treelearner\gpu_tree_learner.h:172: Line contains only semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] [5]
./src\treelearner\gpu_tree_learner.h:176: Line contains only semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] [5]
./src\treelearner\gpu_tree_learner.h:180: Line contains only semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] [5]
./src\treelearner\gpu_tree_learner.h:272: public: should be indented +1 space inside class GPUTreeLearner [whitespace/indent] [3]
./src\treelearner\gpu_tree_learner.h:184: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\treelearner\gpu_tree_learner.h
./include\LightGBM\feature_group.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\feature_group.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_FEATURE_GROUP_H_ [build/header_guard] [5]
./include\LightGBM\feature_group.h:234: #endif line should be "#endif // INCLUDE_LIGHTGBM_FEATURE_GROUP_H_" [build/header_guard] [5]
./include\LightGBM\feature_group.h:19: public: should be indented +1 space inside class FeatureGroup [whitespace/indent] [3]
./include\LightGBM\feature_group.h:31: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::unique_ptr<BinMapper>>& bin_mappers [runtime/refer
./include\LightGBM\feature_group.h:54: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::unique_ptr<BinMapper>>& bin_mappers [runtime/refer
./include\LightGBM\feature_group.h:217: private: should be indented +1 space inside class FeatureGroup [whitespace/indent] [3]
Done processing ./include\LightGBM\feature_group.h
./src\boosting\goss.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\goss.hpp:1: #ifndef header guard has wrong style, please use: SRC_BOOSTING_GOSS_HPP_ [build/header_guard] [5]
./src\boosting\goss.hpp:216: #endif line should be "#endif // SRC_BOOSTING_GOSS_HPP_" [build/header_guard] [5]
./src\boosting\goss.hpp:10: Include the directory when naming .h files [build/include_subdir] [4]
./src\boosting\goss.hpp:12: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:13: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:14: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:15: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:16: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:16: <chrono> is an unapproved C++11 header. [build/c++11] [5]
./src\boosting\goss.hpp:17: Found C++ system header after other header. Should be: goss.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\goss.hpp:27: public: should be indented +1 space inside class GOSS [whitespace/indent] [3]
./src\boosting\goss.hpp:87: Is this a non-const reference? If so, make const or use a pointer: Random& cur_rand [runtime/references] [2]
./src\boosting\goss.hpp:211: private: should be indented +1 space inside class GOSS [whitespace/indent] [3]
Done processing ./src\boosting\goss.hpp
./src\treelearner\data_parallel_tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\data_parallel_tree_learner.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\data_parallel_tree_learner.cpp:3: Found C++ system header after other header. Should be: data_parallel_tree_learner.h, c system, c++ system, other. [build/
./src\treelearner\data_parallel_tree_learner.cpp:5: Found C++ system header after other header. Should be: data_parallel_tree_learner.h, c system, c++ system, other. [build/
./src\treelearner\data_parallel_tree_learner.cpp:6: Found C++ system header after other header. Should be: data_parallel_tree_learner.h, c system, c++ system, other. [build/
./src\treelearner\data_parallel_tree_learner.cpp:138: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
Done processing ./src\treelearner\data_parallel_tree_learner.cpp
./src\treelearner\voting_parallel_tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\voting_parallel_tree_learner.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\voting_parallel_tree_learner.cpp:3: Found C system header after other header. Should be: voting_parallel_tree_learner.h, c system, c++ system, other. [buil
./src\treelearner\voting_parallel_tree_learner.cpp:5: Found C++ system header after other header. Should be: voting_parallel_tree_learner.h, c system, c++ system, other. [bu
./src\treelearner\voting_parallel_tree_learner.cpp:6: Found C++ system header after other header. Should be: voting_parallel_tree_learner.h, c system, c++ system, other. [bu
./src\treelearner\voting_parallel_tree_learner.cpp:7: Found C++ system header after other header. Should be: voting_parallel_tree_learner.h, c system, c++ system, other. [bu
./src\treelearner\voting_parallel_tree_learner.cpp:134: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
Done processing ./src\treelearner\voting_parallel_tree_learner.cpp
./src\io\sparse_bin.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\sparse_bin.hpp:1: #ifndef header guard has wrong style, please use: SRC_IO_SPARSE_BIN_HPP_ [build/header_guard] [5]
./src\io\sparse_bin.hpp:456: #endif line should be "#endif // SRC_IO_SPARSE_BIN_HPP_" [build/header_guard] [5]
./src\io\sparse_bin.hpp:23: public: should be indented +1 space inside class SparseBinIterator [whitespace/indent] [3]
./src\io\sparse_bin.hpp:55: private: should be indented +1 space inside class SparseBinIterator [whitespace/indent] [3]
./src\io\sparse_bin.hpp:70: public: should be indented +1 space inside class SparseBin [whitespace/indent] [3]
./src\io\sparse_bin.hpp:74: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./src\io\sparse_bin.hpp:144: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\sparse_bin.hpp:207: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\sparse_bin.hpp:410: protected: should be indented +1 space inside class SparseBin [whitespace/indent] [3]
./src\io\sparse_bin.hpp:254: Add #include <algorithm> for sort [build/include_what_you_use] [4]
./src\io\sparse_bin.hpp:416: Add #include <utility> for pair<> [build/include_what_you_use] [4]
Done processing ./src\io\sparse_bin.hpp
./src\network\linkers_socket.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\network\linkers_socket.cpp:2: Include the directory when naming .h files [build/include_subdir] [4]
./src\network\linkers_socket.cpp:14: <thread> is an unapproved C++11 header. [build/c++11] [5]
./src\network\linkers_socket.cpp:15: <chrono> is an unapproved C++11 header. [build/c++11] [5]
Done processing ./src\network\linkers_socket.cpp
./include\LightGBM\utils\array_args.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\array_args.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_ARRAY_ARGS_H_ [build/header_guard] [5]
./include\LightGBM\utils\array_args.h:191: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_ARRAY_ARGS_H_" [build/header_guard] [5]
./include\LightGBM\utils\array_args.h:6: Found C system header after C++ system header. Should be: array_args.h, c system, c++ system, other. [build/include_order] [4]
./include\LightGBM\utils\array_args.h:15: public: should be indented +1 space inside class ArrayArgs [whitespace/indent] [3]
./include\LightGBM\utils\array_args.h:113: Empty loop bodies should use {} or continue [whitespace/empty_loop_body] [5]
./include\LightGBM\utils\array_args.h:124: Add #include <utility> for swap [build/include_what_you_use] [4]
Done processing ./include\LightGBM\utils\array_args.h
./src\treelearner\feature_parallel_tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\feature_parallel_tree_learner.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\feature_parallel_tree_learner.cpp:3: Found C++ system header after other header. Should be: feature_parallel_tree_learner.h, c system, c++ system, other. [
./src\treelearner\feature_parallel_tree_learner.cpp:5: Found C++ system header after other header. Should be: feature_parallel_tree_learner.h, c system, c++ system, other. [
Done processing ./src\treelearner\feature_parallel_tree_learner.cpp
./src\boosting\rf.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\rf.hpp:1: #ifndef header guard has wrong style, please use: SRC_BOOSTING_RF_HPP_ [build/header_guard] [5]
./src\boosting\rf.hpp:209: #endif line should be "#endif // SRC_BOOSTING_RF_HPP_" [build/header_guard] [5]
./src\boosting\rf.hpp:7: Include the directory when naming .h files [build/include_subdir] [4]
./src\boosting\rf.hpp:9: Found C++ system header after other header. Should be: rf.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\rf.hpp:10: Found C++ system header after other header. Should be: rf.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\rf.hpp:11: Found C++ system header after other header. Should be: rf.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\rf.hpp:12: Found C++ system header after other header. Should be: rf.h, c system, c++ system, other. [build/include_order] [4]
./src\boosting\rf.hpp:19: public: should be indented +1 space inside class RF [whitespace/indent] [3]
./src\boosting\rf.hpp:202: private: should be indented +1 space inside class RF [whitespace/indent] [3]
Done processing ./src\boosting\rf.hpp
./src\application\predictor.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\application\predictor.hpp:1: #ifndef header guard has wrong style, please use: SRC_APPLICATION_PREDICTOR_HPP_ [build/header_guard] [5]
./src\application\predictor.hpp:257: #endif line should be "#endif // SRC_APPLICATION_PREDICTOR_HPP_" [build/header_guard] [5]
./src\application\predictor.hpp:26: public: should be indented +1 space inside class Predictor [whitespace/indent] [3]
./src\application\predictor.hpp:41: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\application\predictor.hpp:42: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
./src\application\predictor.hpp:210: private: should be indented +1 space inside class Predictor [whitespace/indent] [3]
Done processing ./src\application\predictor.hpp
./src\treelearner\data_partition.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\data_partition.hpp:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_DATA_PARTITION_HPP_ [build/header_guard] [5]
./src\treelearner\data_partition.hpp:225: #endif line should be "#endif // SRC_TREELEARNER_DATA_PARTITION_HPP_" [build/header_guard] [5]
./src\treelearner\data_partition.hpp:18: public: should be indented +1 space inside class DataPartition [whitespace/indent] [3]
./src\treelearner\data_partition.hpp:191: private: should be indented +1 space inside class DataPartition [whitespace/indent] [3]
./src\treelearner\data_partition.hpp:83: Add #include <algorithm> for copy [build/include_what_you_use] [4]
Done processing ./src\treelearner\data_partition.hpp
./include\LightGBM\tree_learner.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\tree_learner.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_TREE_LEARNER_H_ [build/header_guard] [5]
./include\LightGBM\tree_learner.h:100: #endif line should be "#endif // INCLUDE_LIGHTGBM_TREE_LEARNER_H_" [build/header_guard] [5]
./include\LightGBM\tree_learner.h:9: Found C++ system header after other header. Should be: tree_learner.h, c system, c++ system, other. [build/include_order] [4]
./include\LightGBM\tree_learner.h:11: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
./include\LightGBM\tree_learner.h:24: public: should be indented +1 space inside class TreeLearner [whitespace/indent] [3]
./include\LightGBM\tree_learner.h:51: Is this a non-const reference? If so, make const or use a pointer: Json& forced_split_json [runtime/references] [2]
./include\LightGBM\tree_learner.h:94: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./include\LightGBM\tree_learner.h
./src\io\file_io.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\file_io.cpp:45: private: should be indented +1 space inside struct LocalFile [whitespace/indent] [3]
./src\io\file_io.cpp:51: For a static/global string constant, use a C style string instead: "const char kHdfsProto[]". [runtime/string] [4]
./src\io\file_io.cpp:89: private: should be indented +1 space inside struct HDFSFile [whitespace/indent] [3]
./src\io\file_io.cpp:95: Using C-style cast. Use reinterpret_cast<char *>(...) instead [readability/casting] [4]
Done processing ./src\io\file_io.cpp
./include\LightGBM\metric.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\metric.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_METRIC_H_ [build/header_guard] [5]
./include\LightGBM\metric.h:139: #endif line should be "#endif // INCLUDE_LIGHTGBM_METRIC_H_" [build/header_guard] [5]
./include\LightGBM\metric.h:21: public: should be indented +1 space inside class Metric [whitespace/indent] [3]
./include\LightGBM\metric.h:60: public: should be indented +1 space inside class DCGCalculator [whitespace/indent] [3]
./include\LightGBM\metric.h:126: private: should be indented +1 space inside class DCGCalculator [whitespace/indent] [3]
./include\LightGBM\metric.h:53: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./include\LightGBM\metric.h
./src\io\tree.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\tree.cpp:345: Using deprecated casting style. Use static_cast<int>(...) instead [readability/casting] [4]
Done processing ./src\io\tree.cpp
./src\treelearner\feature_histogram.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\feature_histogram.hpp:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_FEATURE_HISTOGRAM_HPP_ [build/header_guard] [5]
./src\treelearner\feature_histogram.hpp:821: #endif line should be "#endif // SRC_TREELEARNER_FEATURE_HISTOGRAM_HPP_" [build/header_guard] [5]
./src\treelearner\feature_histogram.hpp:6: Found C system header after other header. Should be: feature_histogram.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\feature_histogram.hpp:7: Found C system header after other header. Should be: feature_histogram.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\feature_histogram.hpp:9: Found C++ system header after other header. Should be: feature_histogram.h, c system, c++ system, other. [build/include_order] [4]
./src\treelearner\feature_histogram.hpp:10: Found C++ system header after other header. Should be: feature_histogram.h, c system, c++ system, other. [build/include_order] [4
./src\treelearner\feature_histogram.hpp:15: public: should be indented +1 space inside class FeatureMetainfo [whitespace/indent] [3]
./src\treelearner\feature_histogram.hpp:30: public: should be indented +1 space inside class FeatureHistogram [whitespace/indent] [3]
./src\treelearner\feature_histogram.hpp:452: private: should be indented +1 space inside class FeatureHistogram [whitespace/indent] [3]
./src\treelearner\feature_histogram.hpp:647: public: should be indented +1 space inside class HistogramPool [whitespace/indent] [3]
./src\treelearner\feature_histogram.hpp:668: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
./src\treelearner\feature_histogram.hpp:807: private: should be indented +1 space inside class HistogramPool [whitespace/indent] [3]
./src\treelearner\feature_histogram.hpp:439: Add #include <algorithm> for max [build/include_what_you_use] [4]
./src\treelearner\feature_histogram.hpp:790: Add #include <utility> for swap [build/include_what_you_use] [4]
./src\treelearner\feature_histogram.hpp:816: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./src\treelearner\feature_histogram.hpp
./include\LightGBM\utils\text_reader.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\text_reader.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_TEXT_READER_H_ [build/header_guard] [5]
./include\LightGBM\utils\text_reader.h:326: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_TEXT_READER_H_" [build/header_guard] [5]
./include\LightGBM\utils\text_reader.h:22: public: should be indented +1 space inside class TextReader [whitespace/indent] [3]
./include\LightGBM\utils\text_reader.h:104: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:104: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:114: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:114: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:162: Is this a non-const reference? If so, make const or use a pointer: Random& random [runtime/references] [2]
./include\LightGBM\utils\text_reader.h:171: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:171: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:198: Is this a non-const reference? If so, make const or use a pointer: Random& random [runtime/references] [2]
./include\LightGBM\utils\text_reader.h:211: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:211: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:254: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:254: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:267: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:267: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:303: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\text_reader.h:303: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\text_reader.h:309: private: should be indented +1 space inside class TextReader [whitespace/indent] [3]
Done processing ./include\LightGBM\utils\text_reader.h
./include\LightGBM\boosting.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\boosting.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_BOOSTING_H_ [build/header_guard] [5]
./include\LightGBM\boosting.h:304: #endif line should be "#endif // INCLUDE_LIGHTGBM_BOOSTING_H_" [build/header_guard] [5]
./include\LightGBM\boosting.h:23: public: should be indented +1 space inside class Boosting [whitespace/indent] [3]
./include\LightGBM\boosting.h:297: public: should be indented +1 space inside class GBDTBase [whitespace/indent] [3]
Done processing ./include\LightGBM\boosting.h
./src\metric\binary_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\binary_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_BINARY_METRIC_HPP_ [build/header_guard] [5]
./src\metric\binary_metric.hpp:263: #endif line should be "#endif // SRC_METRIC_BINARY_METRIC_HPP_" [build/header_guard] [5]
./src\metric\binary_metric.hpp:21: public: should be indented +1 space inside class BinaryMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:95: private: should be indented +1 space inside class BinaryMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:112: public: should be indented +1 space inside class BinaryLoglossMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:136: public: should be indented +1 space inside class BinaryErrorMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:156: public: should be indented +1 space inside class AUCMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:249: private: should be indented +1 space inside class AUCMetric [whitespace/indent] [3]
./src\metric\binary_metric.hpp:259: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\metric\binary_metric.hpp
./src\metric\dcg_calculator.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\dcg_calculator.cpp:25: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
Done processing ./src\metric\dcg_calculator.cpp
./include\LightGBM\network.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\network.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_NETWORK_H_ [build/header_guard] [5]
./include\LightGBM\network.h:307: #endif line should be "#endif // INCLUDE_LIGHTGBM_NETWORK_H_" [build/header_guard] [5]
./include\LightGBM\network.h:20: public: should be indented +1 space inside class BruckMap [whitespace/indent] [3]
./include\LightGBM\network.h:54: public: should be indented +1 space inside class RecursiveHalvingMap [whitespace/indent] [3]
./include\LightGBM\network.h:87: public: should be indented +1 space inside class Network [whitespace/indent] [3]
./include\LightGBM\network.h:166: Is this a non-const reference? If so, make const or use a pointer: T& local [runtime/references] [2]
./include\LightGBM\network.h:190: Is this a non-const reference? If so, make const or use a pointer: T& local [runtime/references] [2]
./include\LightGBM\network.h:214: Is this a non-const reference? If so, make const or use a pointer: T& local [runtime/references] [2]
./include\LightGBM\network.h:236: Is this a non-const reference? If so, make const or use a pointer: std::vector<T>& local [runtime/references] [2]
./include\LightGBM\network.h:259: private: should be indented +1 space inside class Network [whitespace/indent] [3]
Done processing ./include\LightGBM\network.h
./src\lightgbm_R.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\lightgbm_R.cpp:34: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
Done processing ./src\lightgbm_R.cpp
./include\LightGBM\utils\openmp_wrapper.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\openmp_wrapper.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_OPENMP_WRAPPER_H_ [build/header_guard] [5]
./include\LightGBM\utils\openmp_wrapper.h:75: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_OPENMP_WRAPPER_H_" [build/header_guard] [5]
./include\LightGBM\utils\openmp_wrapper.h:8: <mutex> is an unapproved C++11 header. [build/c++11] [5]
./include\LightGBM\utils\openmp_wrapper.h:11: Include the directory when naming .h files [build/include_subdir] [4]
./include\LightGBM\utils\openmp_wrapper.h:14: public: should be indented +1 space inside class ThreadExceptionHelper [whitespace/indent] [3]
./include\LightGBM\utils\openmp_wrapper.h:34: private: should be indented +1 space inside class ThreadExceptionHelper [whitespace/indent] [3]
Done processing ./include\LightGBM\utils\openmp_wrapper.h
./src\io\config_auto.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\config_auto.cpp:275: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
./src\io\config_auto.cpp:281: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:288: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
./src\io\config_auto.cpp:345: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:348: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:357: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:360: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:379: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:382: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:385: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:460: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:488: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:495: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:504: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:507: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:510: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\config_auto.cpp:521: Redundant blank line at the end of a code block should be deleted. [whitespace/blank_line] [3]
./src\io\config_auto.cpp:626: Namespace should be terminated with "// namespace LightGBM" [readability/namespace] [5]
Done processing ./src\io\config_auto.cpp
./include\LightGBM\tree.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\tree.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_TREE_H_ [build/header_guard] [5]
./include\LightGBM\tree.h:517: #endif line should be "#endif // INCLUDE_LIGHTGBM_TREE_H_" [build/header_guard] [5]
./include\LightGBM\tree.h:21: public: should be indented +1 space inside class Tree [whitespace/indent] [3]
./include\LightGBM\tree.h:206: private: should be indented +1 space inside class Tree [whitespace/indent] [3]
./include\LightGBM\tree.h:262: Using deprecated casting style. Use static_cast<int>(...) instead [readability/casting] [4]
./include\LightGBM\tree.h:271: Using deprecated casting style. Use static_cast<int>(...) instead [readability/casting] [4]
./include\LightGBM\tree.h:334: Complex multi-line /*...*/-style comment found. Lint may give bogus warnings. Consider replacing these with //-style comments, with #if 0...#e
-line comments. [readability/multiline_comment] [5]
./include\LightGBM\tree.h:334: At least two spaces is best between code and comments [whitespace/comments] [2]
./include\LightGBM\tree.h:334: Should have a space between // and comment [whitespace/comments] [4]
./include\LightGBM\tree.h:334: Extra space for operator ! [whitespace/operators] [4]
./include\LightGBM\tree.h:469: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
Done processing ./include\LightGBM\tree.h
./include\LightGBM\objective_function.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\objective_function.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_OBJECTIVE_FUNCTION_H_ [build/header_guard] [5]
./include\LightGBM\objective_function.h:93: #endif line should be "#endif // INCLUDE_LIGHTGBM_OBJECTIVE_FUNCTION_H_" [build/header_guard] [5]
./include\LightGBM\objective_function.h:14: public: should be indented +1 space inside class ObjectiveFunction [whitespace/indent] [3]
./include\LightGBM\objective_function.h:88: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./include\LightGBM\objective_function.h
./include\LightGBM\config.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\config.h:3: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_CONFIG_H_ [build/header_guard] [5]
./include\LightGBM\config.h:879: #endif line should be "#endif // INCLUDE_LIGHTGBM_CONFIG_H_" [build/header_guard] [5]
./include\LightGBM\config.h:28: public: should be indented +1 space inside struct Config [whitespace/indent] [3]
./include\LightGBM\config.h:74: Is this a non-const reference? If so, make const or use a pointer: std::unordered_map<std::string, std::string>& params [runtime/references]
./include\LightGBM\config.h:775: private: should be indented +1 space inside struct Config [whitespace/indent] [3]
Done processing ./include\LightGBM\config.h
./src\application\application.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\application\application.cpp:16: Found C system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:18: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:19: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:21: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:21: <chrono> is an unapproved C++11 header. [build/c++11] [5]
./src\application\application.cpp:22: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:23: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:24: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:25: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
./src\application\application.cpp:26: Found C++ system header after other header. Should be: application.h, c system, c++ system, other. [build/include_order] [4]
Done processing ./src\application\application.cpp
./src\io\bin.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\bin.cpp:11: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:12: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:13: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:15: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:16: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:17: Found C++ system header after other header. Should be: bin.h, c system, c++ system, other. [build/include_order] [4]
./src\io\bin.cpp:76: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\bin.cpp:196: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\io\bin.cpp:392: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
Done processing ./src\io\bin.cpp
./src\io\dense_bin.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\dense_bin.hpp:1: #ifndef header guard has wrong style, please use: SRC_IO_DENSE_BIN_HPP_ [build/header_guard] [5]
./src\io\dense_bin.hpp:339: #endif line should be "#endif // SRC_IO_DENSE_BIN_HPP_" [build/header_guard] [5]
./src\io\dense_bin.hpp:17: public: should be indented +1 space inside class DenseBinIterator [whitespace/indent] [3]
./src\io\dense_bin.hpp:31: private: should be indented +1 space inside class DenseBinIterator [whitespace/indent] [3]
./src\io\dense_bin.hpp:44: public: should be indented +1 space inside class DenseBin [whitespace/indent] [3]
./src\io\dense_bin.hpp:46: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./src\io\dense_bin.hpp:190: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\dense_bin.hpp:251: "virtual" is redundant since function is already declared as "override" [readability/inheritance] [4]
./src\io\dense_bin.hpp:313: protected: should be indented +1 space inside class DenseBin [whitespace/indent] [3]
Done processing ./src\io\dense_bin.hpp
./src\network\socket_wrapper.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\network\socket_wrapper.hpp:1: #ifndef header guard has wrong style, please use: SRC_NETWORK_SOCKET_WRAPPER_HPP_ [build/header_guard] [5]
./src\network\socket_wrapper.hpp:300: #endif line should be "#endif // SRC_NETWORK_SOCKET_WRAPPER_HPP_" [build/header_guard] [5]
./src\network\socket_wrapper.hpp:18: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:19: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:20: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:21: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:22: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:23: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:24: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:25: Found C system header after C++ system header. Should be: socket_wrapper.h, c system, c++ system, other. [build/include_order] [4]
./src\network\socket_wrapper.hpp:89: public: should be indented +1 space inside class TcpSocket [whitespace/indent] [3]
./src\network\socket_wrapper.hpp:176: Using C-style cast. Use reinterpret_cast<IP_ADAPTER_INFO *>(...) instead [readability/casting] [4]
./src\network\socket_wrapper.hpp:184: Using C-style cast. Use reinterpret_cast<IP_ADAPTER_INFO *>(...) instead [readability/casting] [4]
./src\network\socket_wrapper.hpp:216: Are you taking an address of a cast? This is dangerous: could be a temp var. Take the address before doing the cast, rather than after
./src\network\socket_wrapper.hpp:294: private: should be indented +1 space inside class TcpSocket [whitespace/indent] [3]
Done processing ./src\network\socket_wrapper.hpp
./src\objective\objective_function.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Done processing ./src\objective\objective_function.cpp
./src\metric\regression_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\regression_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_REGRESSION_METRIC_HPP_ [build/header_guard] [5]
./src\metric\regression_metric.hpp:316: #endif line should be "#endif // SRC_METRIC_REGRESSION_METRIC_HPP_" [build/header_guard] [5]
./src\metric\regression_metric.hpp:17: public: should be indented +1 space inside class RegressionMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:98: private: should be indented +1 space inside class RegressionMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:114: public: should be indented +1 space inside class RMSEMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:133: public: should be indented +1 space inside class L2Metric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:147: public: should be indented +1 space inside class QuantileMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:168: public: should be indented +1 space inside class L1Metric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:181: public: should be indented +1 space inside class HuberLossMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:202: public: should be indented +1 space inside class FairLossMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:219: public: should be indented +1 space inside class PoissonMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:238: public: should be indented +1 space inside class MAPEMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:251: public: should be indented +1 space inside class GammaMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:268: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\metric\regression_metric.hpp:274: public: should be indented +1 space inside class GammaDevianceMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:290: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\metric\regression_metric.hpp:295: public: should be indented +1 space inside class TweedieMetric [whitespace/indent] [3]
./src\metric\regression_metric.hpp:109: Add #include <string> for string [build/include_what_you_use] [4]
./src\metric\regression_metric.hpp:109: Add #include <vector> for vector<> [build/include_what_you_use] [4]
./src\metric\regression_metric.hpp:243: Add #include <algorithm> for max [build/include_what_you_use] [4]
Done processing ./src\metric\regression_metric.hpp
./src\boosting\gbdt_prediction.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\gbdt_prediction.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
Done processing ./src\boosting\gbdt_prediction.cpp
./src\metric\multiclass_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\multiclass_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_MULTICLASS_METRIC_HPP_ [build/header_guard] [5]
./src\metric\multiclass_metric.hpp:169: #endif line should be "#endif // SRC_METRIC_MULTICLASS_METRIC_HPP_" [build/header_guard] [5]
./src\metric\multiclass_metric.hpp:17: public: should be indented +1 space inside class MulticlassMetric [whitespace/indent] [3]
./src\metric\multiclass_metric.hpp:115: private: should be indented +1 space inside class MulticlassMetric [whitespace/indent] [3]
./src\metric\multiclass_metric.hpp:131: public: should be indented +1 space inside class MultiErrorMetric [whitespace/indent] [3]
./src\metric\multiclass_metric.hpp:134: Is this a non-const reference? If so, make const or use a pointer: std::vector<double>& score [runtime/references] [2]
./src\metric\multiclass_metric.hpp:151: public: should be indented +1 space inside class MultiSoftmaxLoglossMetric [whitespace/indent] [3]
./src\metric\multiclass_metric.hpp:154: Is this a non-const reference? If so, make const or use a pointer: std::vector<double>& score [runtime/references] [2]
./src\metric\multiclass_metric.hpp:125: Add #include <string> for string [build/include_what_you_use] [4]
./src\metric\multiclass_metric.hpp:154: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./src\metric\multiclass_metric.hpp
./src\network\linkers.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\network\linkers.h:1: #ifndef header guard has wrong style, please use: SRC_NETWORK_LINKERS_H_ [build/header_guard] [5]
./src\network\linkers.h:307: #endif line should be "#endif // SRC_NETWORK_LINKERS_H_" [build/header_guard] [5]
./src\network\linkers.h:10: <chrono> is an unapproved C++11 header. [build/c++11] [5]
./src\network\linkers.h:12: <thread> is an unapproved C++11 header. [build/c++11] [5]
./src\network\linkers.h:19: Found C system header after other header. Should be: linkers.h, c system, c++ system, other. [build/include_order] [4]
./src\network\linkers.h:35: public: should be indented +1 space inside class Linkers [whitespace/indent] [3]
./src\network\linkers.h:139: private: should be indented +1 space inside class Linkers [whitespace/indent] [3]
Done processing ./src\network\linkers.h
./include\LightGBM\utils\common.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\common.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_COMMON_H_ [build/header_guard] [5]
./include\LightGBM\utils\common.h:881: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_COMMON_H_" [build/header_guard] [5]
./include\LightGBM\utils\common.h:21: Include the directory when naming .h files [build/include_subdir] [4]
./include\LightGBM\utils\common.h:297: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
./include\LightGBM\utils\common.h:343: Using deprecated casting style. Use static_cast<char>(...) instead [readability/casting] [4]
./include\LightGBM\utils\common.h:345: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./include\LightGBM\utils\common.h:345: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./include\LightGBM\utils\common.h:369: Never use sprintf. Use snprintf instead. [runtime/printf] [5]
./include\LightGBM\utils\common.h:409: Closing ) should be moved to the previous line [whitespace/parens] [2]
./include\LightGBM\utils\common.h:413: Never use sprintf. Use snprintf instead. [runtime/printf] [5]
./include\LightGBM\utils\common.h:622: Is this a non-const reference? If so, make const or use a pointer: std::vector<T1>& keys [runtime/references] [2]
./include\LightGBM\utils\common.h:622: Is this a non-const reference? If so, make const or use a pointer: std::vector<T2>& values [runtime/references] [2]
./include\LightGBM\utils\common.h:643: Is this a non-const reference? If so, make const or use a pointer: std::vector<std::vector<T>>& data [runtime/references] [2]
./include\LightGBM\utils\common.h:557: Add #include <limits> for numeric_limits<> [build/include_what_you_use] [4]
./include\LightGBM\utils\common.h:632: Add #include <utility> for pair<> [build/include_what_you_use] [4]
Done processing ./include\LightGBM\utils\common.h
./src\objective\rank_objective.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\objective\rank_objective.hpp:1: #ifndef header guard has wrong style, please use: SRC_OBJECTIVE_RANK_OBJECTIVE_HPP_ [build/header_guard] [5]
./src\objective\rank_objective.hpp:240: #endif line should be "#endif // SRC_OBJECTIVE_RANK_OBJECTIVE_HPP_" [build/header_guard] [5]
./src\objective\rank_objective.hpp:20: public: should be indented +1 space inside class LambdarankNDCG [whitespace/indent] [3]
./src\objective\rank_objective.hpp:208: private: should be indented +1 space inside class LambdarankNDCG [whitespace/indent] [3]
./src\objective\rank_objective.hpp:200: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\objective\rank_objective.hpp
./src\io\ordered_sparse_bin.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\ordered_sparse_bin.hpp:1: #ifndef header guard has wrong style, please use: SRC_IO_ORDERED_SPARSE_BIN_HPP_ [build/header_guard] [5]
./src\io\ordered_sparse_bin.hpp:211: #endif line should be "#endif // SRC_IO_ORDERED_SPARSE_BIN_HPP_" [build/header_guard] [5]
./src\io\ordered_sparse_bin.hpp:10: <mutex> is an unapproved C++11 header. [build/c++11] [5]
./src\io\ordered_sparse_bin.hpp:27: public: should be indented +1 space inside class OrderedSparseBin [whitespace/indent] [3]
./src\io\ordered_sparse_bin.hpp:35: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./src\io\ordered_sparse_bin.hpp:195: private: should be indented +1 space inside class OrderedSparseBin [whitespace/indent] [3]
./src\io\ordered_sparse_bin.hpp:178: Add #include <utility> for swap [build/include_what_you_use] [4]
Done processing ./src\io\ordered_sparse_bin.hpp
./src\objective\binary_objective.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\objective\binary_objective.hpp:1: #ifndef header guard has wrong style, please use: SRC_OBJECTIVE_BINARY_OBJECTIVE_HPP_ [build/header_guard] [5]
./src\objective\binary_objective.hpp:196: #endif line should be "#endif // SRC_OBJECTIVE_BINARY_OBJECTIVE_HPP_" [build/header_guard] [5]
./src\objective\binary_objective.hpp:14: public: should be indented +1 space inside class BinaryLogloss [whitespace/indent] [3]
./src\objective\binary_objective.hpp:175: private: should be indented +1 space inside class BinaryLogloss [whitespace/indent] [3]
./src\objective\binary_objective.hpp:31: Add #include <vector> for vector<> [build/include_what_you_use] [4]
./src\objective\binary_objective.hpp:146: Add #include <algorithm> for max [build/include_what_you_use] [4]
./src\objective\binary_objective.hpp:164: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\objective\binary_objective.hpp
./src\metric\xentropy_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\xentropy_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_XENTROPY_METRIC_HPP_ [build/header_guard] [5]
./src\metric\xentropy_metric.hpp:356: #endif line should be "#endif // SRC_METRIC_XENTROPY_METRIC_HPP_" [build/header_guard] [5]
./src\metric\xentropy_metric.hpp:68: public: should be indented +1 space inside class CrossEntropyMetric [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:89: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\metric\xentropy_metric.hpp:145: private: should be indented +1 space inside class CrossEntropyMetric [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:163: public: should be indented +1 space inside class CrossEntropyLambdaMetric [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:180: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\metric\xentropy_metric.hpp:231: private: should be indented +1 space inside class CrossEntropyLambdaMetric [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:246: public: should be indented +1 space inside class KullbackLeiblerDivergence [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:264: Using C-style cast. Use reinterpret_cast<label_t*>(...) instead [readability/casting] [4]
./src\metric\xentropy_metric.hpp:339: private: should be indented +1 space inside class KullbackLeiblerDivergence [whitespace/indent] [3]
./src\metric\xentropy_metric.hpp:351: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\metric\xentropy_metric.hpp
./include\LightGBM\utils\random.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\utils\random.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_UTILS_RANDOM_H_ [build/header_guard] [5]
./include\LightGBM\utils\random.h:114: #endif line should be "#endif // INCLUDE_LIGHTGBM_UTILS_RANDOM_H_" [build/header_guard] [5]
./include\LightGBM\utils\random.h:16: public: should be indented +1 space inside class Random [whitespace/indent] [3]
./include\LightGBM\utils\random.h:29: Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
./include\LightGBM\utils\random.h:97: private: should be indented +1 space inside class Random [whitespace/indent] [3]
Done processing ./include\LightGBM\utils\random.h
./src\metric\rank_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\rank_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_RANK_METRIC_HPP_ [build/header_guard] [5]
./src\metric\rank_metric.hpp:171: #endif line should be "#endif // SRC_METRIC_RANK_METRIC_HPP_" [build/header_guard] [5]
./src\metric\rank_metric.hpp:16: public: should be indented +1 space inside class NDCGMetric [whitespace/indent] [3]
./src\metric\rank_metric.hpp:146: private: should be indented +1 space inside class NDCGMetric [whitespace/indent] [3]
./src\metric\rank_metric.hpp:152: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\metric\rank_metric.hpp
./src\boosting\gbdt.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\gbdt.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\boosting\gbdt.cpp:14: <chrono> is an unapproved C++11 header. [build/c++11] [5]
./src\boosting\gbdt.cpp:264: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
Done processing ./src\boosting\gbdt.cpp
./src\boosting\gbdt_model_text.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\boosting\gbdt_model_text.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\boosting\gbdt_model_text.cpp:13: For a static/global string constant, use a C style string instead: "const char kModelVersion[]". [runtime/string] [4]
./src\boosting\gbdt_model_text.cpp:241: Using C-style cast. Use static_cast<bool>(...) instead [readability/casting] [4]
./src\boosting\gbdt_model_text.cpp:340: Using C-style cast. Use static_cast<bool>(...) instead [readability/casting] [4]
./src\boosting\gbdt_model_text.cpp:359: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\boosting\gbdt_model_text.cpp:359: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\boosting\gbdt_model_text.cpp:362: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\boosting\gbdt_model_text.cpp:362: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\boosting\gbdt_model_text.cpp:371: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\boosting\gbdt_model_text.cpp:371: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\boosting\gbdt_model_text.cpp:454: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\boosting\gbdt_model_text.cpp:454: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Done processing ./src\boosting\gbdt_model_text.cpp
./include\LightGBM\R_object_helper.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\R_object_helper.h:6: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_R_OBJECT_HELPER_H_ [build/header_guard] [5]
./include\LightGBM\R_object_helper.h:188: #endif line should be "#endif // INCLUDE_LIGHTGBM_R_OBJECT_HELPER_H_" [build/header_guard] [5]
./include\LightGBM\R_object_helper.h:121: Using C-style cast. Use reinterpret_cast<SEXPREC_ALIGN *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:123: Using C-style cast. Use reinterpret_cast<char *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:125: Using C-style cast. Use reinterpret_cast<int *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:127: Using C-style cast. Use reinterpret_cast<int64_t *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:129: Using C-style cast. Use reinterpret_cast<double *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:131: Using C-style cast. Use reinterpret_cast<int *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:133: Using C-style cast. Use reinterpret_cast<int64_t *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:140: Using C-style cast. Use reinterpret_cast<int64_t *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:154: Using C-style cast. Use reinterpret_cast<void *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:164: Using C-style cast. Use reinterpret_cast<int32_t *>(...) instead [readability/casting] [4]
./include\LightGBM\R_object_helper.h:178: Using C-style cast. Use reinterpret_cast<void *>(...) instead [readability/casting] [4]
Done processing ./include\LightGBM\R_object_helper.h
./include\LightGBM\application.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\application.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_APPLICATION_H_ [build/header_guard] [5]
./include\LightGBM\application.h:88: #endif line should be "#endif // INCLUDE_LIGHTGBM_APPLICATION_H_" [build/header_guard] [5]
./include\LightGBM\application.h:26: public: should be indented +1 space inside class Application [whitespace/indent] [3]
./include\LightGBM\application.h:35: private: should be indented +1 space inside class Application [whitespace/indent] [3]
Done processing ./include\LightGBM\application.h
./src\c_api.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\c_api.cpp:23: <mutex> is an unapproved C++11 header. [build/c++11] [5]
./src\c_api.cpp:47: public: should be indented +1 space inside class Booster [whitespace/indent] [3]
./src\c_api.cpp:326: private: should be indented +1 space inside class Booster [whitespace/indent] [3]
./src\c_api.cpp:343: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
./src\c_api.cpp:359: public: should be indented +1 space inside class CSC_RowIterator [whitespace/indent] [3]
./src\c_api.cpp:367: private: should be indented +1 space inside class CSC_RowIterator [whitespace/indent] [3]
./src\c_api.cpp:761: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
Done processing ./src\c_api.cpp
./src\network\linkers_mpi.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\network\linkers_mpi.cpp:2: Include the directory when naming .h files [build/include_subdir] [4]
Done processing ./src\network\linkers_mpi.cpp
./include\LightGBM\meta.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\meta.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_META_H_ [build/header_guard] [5]
./include\LightGBM\meta.h:67: #endif line should be "#endif // INCLUDE_LIGHTGBM_META_H_" [build/header_guard] [5]
./include\LightGBM\meta.h:46: Add #include <utility> for pair<> [build/include_what_you_use] [4]
Done processing ./include\LightGBM\meta.h
./src\treelearner\split_info.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\split_info.hpp:1: #ifndef header guard has wrong style, please use: SRC_TREELEARNER_SPLIT_INFO_HPP_ [build/header_guard] [5]
./src\treelearner\split_info.hpp:285: #endif line should be "#endif // SRC_TREELEARNER_SPLIT_INFO_HPP_" [build/header_guard] [5]
./src\treelearner\split_info.hpp:18: public: should be indented +1 space inside struct SplitInfo [whitespace/indent] [3]
./src\treelearner\split_info.hpp:191: public: should be indented +1 space inside struct LightSplitInfo [whitespace/indent] [3]
./src\treelearner\split_info.hpp:42: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing ./src\treelearner\split_info.hpp
./src\io\parser.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\parser.hpp:1: #ifndef header guard has wrong style, please use: SRC_IO_PARSER_HPP_ [build/header_guard] [5]
./src\io\parser.hpp:129: #endif line should be "#endif // SRC_IO_PARSER_HPP_" [build/header_guard] [5]
./src\io\parser.hpp:16: public: should be indented +1 space inside class CSVParser [whitespace/indent] [3]
./src\io\parser.hpp:32: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\parser.hpp:32: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\io\parser.hpp:48: private: should be indented +1 space inside class CSVParser [whitespace/indent] [3]
./src\io\parser.hpp:54: public: should be indented +1 space inside class TSVParser [whitespace/indent] [3]
./src\io\parser.hpp:84: private: should be indented +1 space inside class TSVParser [whitespace/indent] [3]
./src\io\parser.hpp:90: public: should be indented +1 space inside class LibSVMParser [whitespace/indent] [3]
./src\io\parser.hpp:124: private: should be indented +1 space inside class LibSVMParser [whitespace/indent] [3]
Done processing ./src\io\parser.hpp
./src\main.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\main.cpp:2: Found C system header after C++ system header. Should be: main.h, c system, c++ system, other. [build/include_order] [4]
Done processing ./src\main.cpp
./src\io\json11.cpp:53: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:57: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:67: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:73: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:77: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:114: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:126: Is this a non-const reference? If so, make const or use a pointer: string &out [runtime/references] [2]
./src\io\json11.cpp:150: protected: should be indented +1 space inside class Value [whitespace/indent] [3]
./src\io\json11.cpp:177: public: should be indented +1 space inside class JsonDouble [whitespace/indent] [3]
./src\io\json11.cpp:186: public: should be indented +1 space inside class JsonInt [whitespace/indent] [3]
./src\io\json11.cpp:192: public: should be indented +1 space inside class JsonBoolean [whitespace/indent] [3]
./src\io\json11.cpp:198: public: should be indented +1 space inside class JsonString [whitespace/indent] [3]
./src\io\json11.cpp:206: public: should be indented +1 space inside class JsonArray [whitespace/indent] [3]
./src\io\json11.cpp:214: public: should be indented +1 space inside class JsonObject [whitespace/indent] [3]
./src\io\json11.cpp:220: public: should be indented +1 space inside class JsonNull [whitespace/indent] [3]
./src\io\json11.cpp:294: Else clause should never be on same line as else (use 2 lines) [whitespace/newline] [4]
./src\io\json11.cpp:337: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
./src\io\json11.cpp:349: const string& members are dangerous. It is much better to use alternatives, such as pointers or simple constants. [runtime/member_string_references]
./src\io\json11.cpp:390: At least two spaces is best between code and comments [whitespace/comments] [2]
./src\io\json11.cpp:398: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\json11.cpp:398: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\io\json11.cpp:411: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\json11.cpp:430: Empty loop bodies should use {} or continue [whitespace/empty_loop_body] [5]
./src\io\json11.cpp:441: Using C-style cast. Use static_cast<char>(...) instead [readability/casting] [4]
./src\io\json11.cpp:443: Using C-style cast. Use static_cast<char>(...) instead [readability/casting] [4]
./src\io\json11.cpp:452: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
./src\io\json11.cpp:452: Is this a non-const reference? If so, make const or use a pointer: string & out [runtime/references] [2]
./src\io\json11.cpp:479: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
./src\io\json11.cpp:523: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
Done processing ./src\io\json11.cpp
./src\treelearner\serial_tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\serial_tree_learner.cpp:1: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\serial_tree_learner.cpp:272: Consider using CHECK_GE instead of CHECK(a >= b) [readability/check] [2]
./src\treelearner\serial_tree_learner.cpp:801: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\treelearner\serial_tree_learner.cpp:841: Consider using CHECK_GT instead of CHECK(a > b) [readability/check] [2]
./src\treelearner\serial_tree_learner.cpp:607: Add #include <utility> for pair<> [build/include_what_you_use] [4]
Done processing ./src\treelearner\serial_tree_learner.cpp
./src\metric\map_metric.hpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\metric\map_metric.hpp:1: #ifndef header guard has wrong style, please use: SRC_METRIC_MAP_METRIC_HPP_ [build/header_guard] [5]
./src\metric\map_metric.hpp:168: #endif line should be "#endif // SRC_METRIC_MAP_METRIC_HPP_" [build/header_guard] [5]
./src\metric\map_metric.hpp:16: public: should be indented +1 space inside class MapMetric [whitespace/indent] [3]
./src\metric\map_metric.hpp:145: private: should be indented +1 space inside class MapMetric [whitespace/indent] [3]
./src\metric\map_metric.hpp:99: Add #include <algorithm> for min [build/include_what_you_use] [4]
./src\metric\map_metric.hpp:162: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\metric\map_metric.hpp
./include\LightGBM\export.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\export.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_EXPORT_H_ [build/header_guard] [5]
./include\LightGBM\export.h:21: #endif line should be "#endif // INCLUDE_LIGHTGBM_EXPORT_H_" [build/header_guard] [5]
Done processing ./include\LightGBM\export.h
./src\network\linker_topo.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Done processing ./src\network\linker_topo.cpp
./include\LightGBM\bin.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\bin.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_BIN_H_ [build/header_guard] [5]
./include\LightGBM\bin.h:492: #endif line should be "#endif // INCLUDE_LIGHTGBM_BIN_H_" [build/header_guard] [5]
./include\LightGBM\bin.h:30: public: should be indented +1 space inside struct HistogramBinEntry [whitespace/indent] [3]
./include\LightGBM\bin.h:62: public: should be indented +1 space inside class BinMapper [whitespace/indent] [3]
./include\LightGBM\bin.h:187: private: should be indented +1 space inside class BinMapper [whitespace/indent] [3]
./include\LightGBM\bin.h:220: public: should be indented +1 space inside class OrderedBin [whitespace/indent] [3]
./include\LightGBM\bin.h:268: public: should be indented +1 space inside class BinIterator [whitespace/indent] [3]
./include\LightGBM\bin.h:287: public: should be indented +1 space inside class Bin [whitespace/indent] [3]
./include\LightGBM\bin.h:176: Add #include <string> for string [build/include_what_you_use] [4]
./include\LightGBM\bin.h:181: Add #include <limits> for numeric_limits<> [build/include_what_you_use] [4]
Done processing ./include\LightGBM\bin.h
./src\metric\metric.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Done processing ./src\metric\metric.cpp
./src\treelearner\tree_learner.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\treelearner\tree_learner.cpp:3: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\tree_learner.cpp:4: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\tree_learner.cpp:5: Include the directory when naming .h files [build/include_subdir] [4]
./src\treelearner\tree_learner.cpp:21: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\treelearner\tree_learner.cpp:21: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Done processing ./src\treelearner\tree_learner.cpp
./src\io\parser.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./src\io\parser.cpp:25: Is this a non-const reference? If so, make const or use a pointer: std::string& str [runtime/references] [2]
./src\io\parser.cpp:39: Is this a non-const reference? If so, make const or use a pointer: std::string& str [runtime/references] [2]
./src\io\parser.cpp:52: Is this a non-const reference? If so, make const or use a pointer: std::string& str [runtime/references] [2]
./src\io\parser.cpp:72: Is this a non-const reference? If so, make const or use a pointer: std::string& line [runtime/references] [2]
./src\io\parser.cpp:72: Is this a non-const reference? If so, make const or use a pointer: std::vector<char>& buffer [runtime/references] [2]
./src\io\parser.cpp:154: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\parser.cpp:154: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\io\parser.cpp:158: An else should appear on the same line as the preceding } [whitespace/newline] [4]
./src\io\parser.cpp:158: If an else has a brace on one side, it should have it on both [readability/braces] [5]
./src\io\parser.cpp:100: Add #include <string> for string [build/include_what_you_use] [4]
Done processing ./src\io\parser.cpp
./include\LightGBM\c_api.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
./include\LightGBM\c_api.h:1: #ifndef header guard has wrong style, please use: INCLUDE_LIGHTGBM_C_API_H_ [build/header_guard] [5]
./include\LightGBM\c_api.h:834: #endif line should be "#endif // INCLUDE_LIGHTGBM_C_API_H_" [build/header_guard] [5]
./include\LightGBM\c_api.h:15: Found C system header after C++ system header. Should be: c_api.h, c system, c++ system, other. [build/include_order] [4]
./include\LightGBM\c_api.h:831: Almost always, snprintf is better than strcpy [runtime/printf] [4]
Done processing ./include\LightGBM\c_api.h
Total errors found: 853
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 48
@StrikerRUS I will work on json11 when I have time
https://github.com/microsoft/LightGBM/commit/9843506e63c546b989df16e6235261fd38ce247d
🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 Total errors found: 0 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉
Report (clickable)
We did it! Thanks for pushing this forward @StrikerRUS and for all the assistance @guolinke . Some of the linting issues fixed here were stylistic, but many were genuinely about the safety of the code, so I think all the effort here was well worth it.
@guolinke It seems to me that there are no errors anymore which I can address. Maybe you can? All remaining issues we can mark as
// NOLINTor include in--filteroption and finally deploy this lint check at our CI test.@guolinke We already have a PR for 1 (about
snprintf) of 4 remaining issues. Do you know how to fix the rest 3 quickly or should we mark them asNOLINTfor now to enable auto-checking ASAP?5c201e48f2cf853fede4352de236233cee7289b4
Total errors found: 4
Report (Clickable):
6d9e7f1796abfe47846cb06abe7b1847fa77ded5
Total errors found: 39
Report (Clickable):
https://github.com/microsoft/LightGBM/commit/3a335e9d4f63da10094d690a92cbefd0f4e6faf6
Total errors found: 40
Report (Clickable)
https://github.com/microsoft/LightGBM/commit/3e540eac97640159d471d56951b6ce026b4f4869
Total errors found: 42
Report (Clickable):
@jameslamb Sure, please do it!
Huh, 853 -> 49! I believe we are almost done with this issue and will be able to enable cpplint check at CI in the near future. @guolinke Can you please help with the rest errors, mainly with
json11?1e5049a1a6bdde4e37701a237b025bfe060e4119
Total errors found: 92
Report (Clickable):
https://github.com/microsoft/LightGBM/commit/a8dc03250e235a00baf3ecefe4155023624dd239
Total errors found: 87
Report (Clickable):
7feaaefb5b730524d12449e48d93a862a668a024
Total errors found: 88
Report (Clickable):
@StrikerRUS
NOLINTlooks good to me.@StrikerRUS I think we could add them, but I don’t have much spare time for it now. Maybe you could help to implement it, or i could do it in the future?
716fe4d015c2333f9a261f853ff559ef385add17
Total errors found: 210
Report (Clickable):
@StrikerRUS It looks good to me. Thanks very much for your great work!