cpplint: add filter build/include_subdir (#29585)

This commit is contained in:
Dean Lee
2023-08-24 22:42:17 +08:00
committed by GitHub
parent d013f2174a
commit 21da5a216f
35 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ repos:
- --linelength=240
# https://google.github.io/styleguide/cppguide.html
# relevant rules are whitelisted, see all options with: cpplint --filter=
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+readability/braces
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+readability/braces
- repo: local
hooks:
- id: test_translations
+1 -1
View File
@@ -12,7 +12,7 @@
#include <string>
#include <zmq.h>
#include "json11.hpp"
#include "third_party/json11/json11.hpp"
#include "common/util.h"
#include "common/version.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
#include "json11.hpp"
#include "third_party/json11/json11.hpp"
#include "common/swaglog.h"
#include "common/util.h"
#include "common/version.h"
+2 -4
View File
@@ -1,13 +1,11 @@
#define _USE_MATH_DEFINES
#include "common/transformations/coordinates.hpp"
#include <iostream>
#include <cmath>
#include <eigen3/Eigen/Dense>
#include "coordinates.hpp"
double a = 6378137; // lgtm [cpp/short-global-name]
double b = 6356752.3142; // lgtm [cpp/short-global-name]
double esq = 6.69437999014 * 0.001; // lgtm [cpp/short-global-name]
+2
View File
@@ -1,5 +1,7 @@
#pragma once
#include <eigen3/Eigen/Dense>
#define DEG2RAD(x) ((x) * M_PI / 180.0)
#define RAD2DEG(x) ((x) * 180.0 / M_PI)
+2 -2
View File
@@ -4,8 +4,8 @@
#include <cmath>
#include <eigen3/Eigen/Dense>
#include "orientation.hpp"
#include "coordinates.hpp"
#include "common/transformations/orientation.hpp"
#include "common/transformations/coordinates.hpp"
Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat){
if (quat.w() > 0){
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include <eigen3/Eigen/Dense>
#include "coordinates.hpp"
#include "common/transformations/coordinates.hpp"
Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat);
+1 -1
View File
@@ -1,5 +1,5 @@
#include "cereal/messaging/messaging.h"
#include "panda.h"
#include "selfdrive/boardd/panda.h"
void can_list_to_can_capnp_cpp(const std::vector<can_frame> &can_list, std::string &out, bool sendCan, bool valid) {
MessageBuilder msg;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "locationd.h"
#include "selfdrive/locationd/locationd.h"
extern "C" {
typedef Localizer* Localizer_t;
+2 -2
View File
@@ -1,3 +1,5 @@
#include "selfdrive/locationd/locationd.h"
#include <sys/time.h>
#include <sys/resource.h>
@@ -5,8 +7,6 @@
#include <cmath>
#include <vector>
#include "locationd.h"
using namespace EKFS;
using namespace Eigen;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "live_kf.h"
#include "selfdrive/locationd/models/live_kf.h"
using namespace EKFS;
using namespace Eigen;
+4 -4
View File
@@ -1,10 +1,10 @@
#pragma once
#include "runmodel.h"
#include "snpemodel.h"
#include "selfdrive/modeld/runners/runmodel.h"
#include "selfdrive/modeld/runners/snpemodel.h"
#if defined(USE_THNEED)
#include "thneedmodel.h"
#include "selfdrive/modeld/runners/thneedmodel.h"
#elif defined(USE_ONNX_MODEL)
#include "onnxmodel.h"
#include "selfdrive/modeld/runners/onnxmodel.h"
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#include <cassert>
#include <set>
#include "json11.hpp"
#include "third_party/json11/json11.hpp"
#include "common/util.h"
#include "common/clutil.h"
#include "selfdrive/modeld/thneed/thneed.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include <CL/cl.h>
#include "msm_kgsl.h"
#include "third_party/linux/include/msm_kgsl.h"
using namespace std;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "map_settings.h"
#include "selfdrive/ui/qt/maps/map_settings.h"
#include <utility>
+2 -2
View File
@@ -8,7 +8,7 @@
#include <string>
#include <thread>
#include "libyuv.h"
#include "third_party/libyuv/include/libyuv.h"
#include <jpeglib.h>
#include "system/camerad/imgproc/utils.h"
@@ -17,7 +17,7 @@
#include "common/swaglog.h"
#include "common/util.h"
#include "system/hardware/hw.h"
#include "msm_media_info.h"
#include "third_party/linux/include/msm_media_info.h"
#include "system/camerad/cameras/camera_qcom2.h"
#ifdef QCOM2
+1 -1
View File
@@ -1,6 +1,6 @@
// unittest for set_exposure_target
#include "ae_gray_test.h"
#include "system/camerad/test/ae_gray_test.h"
#include <cassert>
+1 -1
View File
@@ -5,7 +5,7 @@
#include <map>
#include <string>
#include "json11.hpp"
#include "third_party/json11/json11.hpp"
#include "cereal/messaging/messaging.h"
#include "common/timing.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#define __STDC_CONSTANT_MACROS
#include "libyuv.h"
#include "third_party/libyuv/include/libyuv.h"
extern "C" {
#include <libavcodec/avcodec.h>
+3 -3
View File
@@ -7,11 +7,11 @@
#include "common/util.h"
#include "common/timing.h"
#include "libyuv.h"
#include "msm_media_info.h"
#include "third_party/libyuv/include/libyuv.h"
#include "third_party/linux/include/msm_media_info.h"
// has to be in this order
#include "v4l2-controls.h"
#include "third_party/linux/include/v4l2-controls.h"
#include <linux/videodev2.h>
#define V4L2_QCOM_BUF_FLAG_CODECCONFIG 0x00020000
#define V4L2_QCOM_BUF_FLAG_EOS 0x02000000
+1 -1
View File
@@ -1,4 +1,4 @@
#include "bmx055_accel.h"
#include "system/sensord/sensors/bmx055_accel.h"
#include <cassert>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "bmx055_gyro.h"
#include "system/sensord/sensors/bmx055_gyro.h"
#include <cassert>
#include <cmath>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "bmx055_magn.h"
#include "system/sensord/sensors/bmx055_magn.h"
#include <unistd.h>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "bmx055_temp.h"
#include "system/sensord/sensors/bmx055_temp.h"
#include <cassert>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
int16_t read_12_bit(uint8_t lsb, uint8_t msb) {
uint16_t combined = (uint16_t(msb) << 8) | uint16_t(lsb & 0xF0);
+1 -1
View File
@@ -1,4 +1,4 @@
#include "lsm6ds3_accel.h"
#include "system/sensord/sensors/lsm6ds3_accel.h"
#include <cassert>
#include <cmath>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "lsm6ds3_gyro.h"
#include "system/sensord/sensors/lsm6ds3_gyro.h"
#include <cassert>
#include <cmath>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "lsm6ds3_temp.h"
#include "system/sensord/sensors/lsm6ds3_temp.h"
#include <cassert>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "mmc5603nj_magn.h"
#include "system/sensord/sensors/mmc5603nj_magn.h"
#include <algorithm>
#include <cassert>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "ublox_msg.h"
#include "system/ubloxd/ublox_msg.h"
#include <unistd.h>
-1
View File
@@ -1,5 +1,4 @@
#include "tools/cabana/streams/socketcanstream.h"
#include "socketcanstream.h"
#include <QLabel>
#include <QMessageBox>
+2 -2
View File
@@ -1,8 +1,8 @@
#include "./bitstream.h"
#include <stdbool.h>
#include <assert.h>
#include "bitstream.h"
static const uint32_t BS_MASKS[33] = {
0, 0x1L, 0x3L, 0x7L, 0xFL, 0x1FL,
0x3FL, 0x7FL, 0xFFL, 0x1FFL, 0x3FFL, 0x7FFL,
+1 -1
View File
@@ -9,7 +9,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include "bitstream.h"
#include "./bitstream.h"
#define START_CODE 0x000001
+3 -2
View File
@@ -1,10 +1,11 @@
#include "tools/replay/camera.h"
#include "tools/replay/util.h"
#include "msm_media_info.h"
#include <cassert>
#include <tuple>
#include "third_party/linux/include/msm_media_info.h"
#include "tools/replay/util.h"
std::tuple<size_t, size_t, size_t> get_nv12_info(int width, int height) {
int nv12_width = VENUS_Y_STRIDE(COLOR_FMT_NV12, width);
int nv12_height = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height);
+1 -1
View File
@@ -3,7 +3,7 @@
#include <cassert>
#include <algorithm>
#include "libyuv.h"
#include "third_party/libyuv/include/libyuv.h"
#ifdef __APPLE__
#define HW_DEVICE_TYPE AV_HWDEVICE_TYPE_VIDEOTOOLBOX