cpplint: add filter `build/include_subdir` (#29585)

pull/29588/head
Dean Lee 2 years ago committed by GitHub
parent d013f2174a
commit 21da5a216f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .pre-commit-config.yaml
  2. 2
      common/swaglog.cc
  3. 2
      common/tests/test_swaglog.cc
  4. 6
      common/transformations/coordinates.cc
  5. 2
      common/transformations/coordinates.hpp
  6. 4
      common/transformations/orientation.cc
  7. 2
      common/transformations/orientation.hpp
  8. 2
      selfdrive/boardd/can_list_to_can_capnp.cc
  9. 2
      selfdrive/locationd/liblocationd.cc
  10. 4
      selfdrive/locationd/locationd.cc
  11. 2
      selfdrive/locationd/models/live_kf.cc
  12. 8
      selfdrive/modeld/runners/run.h
  13. 2
      selfdrive/modeld/thneed/serialize.cc
  14. 2
      selfdrive/modeld/thneed/thneed.h
  15. 2
      selfdrive/ui/qt/maps/map_settings.cc
  16. 4
      system/camerad/cameras/camera_common.cc
  17. 2
      system/camerad/test/ae_gray_test.cc
  18. 2
      system/logcatd/logcatd_systemd.cc
  19. 2
      system/loggerd/encoder/ffmpeg_encoder.cc
  20. 6
      system/loggerd/encoder/v4l_encoder.cc
  21. 2
      system/sensord/sensors/bmx055_accel.cc
  22. 2
      system/sensord/sensors/bmx055_gyro.cc
  23. 2
      system/sensord/sensors/bmx055_magn.cc
  24. 2
      system/sensord/sensors/bmx055_temp.cc
  25. 2
      system/sensord/sensors/i2c_sensor.cc
  26. 2
      system/sensord/sensors/lsm6ds3_accel.cc
  27. 2
      system/sensord/sensors/lsm6ds3_gyro.cc
  28. 2
      system/sensord/sensors/lsm6ds3_temp.cc
  29. 2
      system/sensord/sensors/mmc5603nj_magn.cc
  30. 2
      system/ubloxd/ublox_msg.cc
  31. 1
      tools/cabana/streams/socketcanstream.cc
  32. 4
      tools/lib/vidindex/bitstream.c
  33. 2
      tools/lib/vidindex/vidindex.c
  34. 5
      tools/replay/camera.cc
  35. 2
      tools/replay/framereader.cc

@ -64,7 +64,7 @@ repos:
- --linelength=240 - --linelength=240
# https://google.github.io/styleguide/cppguide.html # https://google.github.io/styleguide/cppguide.html
# relevant rules are whitelisted, see all options with: cpplint --filter= # 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 - repo: local
hooks: hooks:
- id: test_translations - id: test_translations

@ -12,7 +12,7 @@
#include <string> #include <string>
#include <zmq.h> #include <zmq.h>
#include "json11.hpp" #include "third_party/json11/json11.hpp"
#include "common/util.h" #include "common/util.h"
#include "common/version.h" #include "common/version.h"

@ -3,7 +3,7 @@
#define CATCH_CONFIG_MAIN #define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp" #include "catch2/catch.hpp"
#include "json11.hpp" #include "third_party/json11/json11.hpp"
#include "common/swaglog.h" #include "common/swaglog.h"
#include "common/util.h" #include "common/util.h"
#include "common/version.h" #include "common/version.h"

@ -1,13 +1,11 @@
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#include "common/transformations/coordinates.hpp"
#include <iostream> #include <iostream>
#include <cmath> #include <cmath>
#include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Dense>
#include "coordinates.hpp"
double a = 6378137; // lgtm [cpp/short-global-name] double a = 6378137; // lgtm [cpp/short-global-name]
double b = 6356752.3142; // 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] double esq = 6.69437999014 * 0.001; // lgtm [cpp/short-global-name]

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <eigen3/Eigen/Dense>
#define DEG2RAD(x) ((x) * M_PI / 180.0) #define DEG2RAD(x) ((x) * M_PI / 180.0)
#define RAD2DEG(x) ((x) * 180.0 / M_PI) #define RAD2DEG(x) ((x) * 180.0 / M_PI)

@ -4,8 +4,8 @@
#include <cmath> #include <cmath>
#include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Dense>
#include "orientation.hpp" #include "common/transformations/orientation.hpp"
#include "coordinates.hpp" #include "common/transformations/coordinates.hpp"
Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat){ Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat){
if (quat.w() > 0){ if (quat.w() > 0){

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Dense>
#include "coordinates.hpp" #include "common/transformations/coordinates.hpp"
Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat); Eigen::Quaterniond ensure_unique(Eigen::Quaterniond quat);

@ -1,5 +1,5 @@
#include "cereal/messaging/messaging.h" #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) { void can_list_to_can_capnp_cpp(const std::vector<can_frame> &can_list, std::string &out, bool sendCan, bool valid) {
MessageBuilder msg; MessageBuilder msg;

@ -1,4 +1,4 @@
#include "locationd.h" #include "selfdrive/locationd/locationd.h"
extern "C" { extern "C" {
typedef Localizer* Localizer_t; typedef Localizer* Localizer_t;

@ -1,3 +1,5 @@
#include "selfdrive/locationd/locationd.h"
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
@ -5,8 +7,6 @@
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include "locationd.h"
using namespace EKFS; using namespace EKFS;
using namespace Eigen; using namespace Eigen;

@ -1,4 +1,4 @@
#include "live_kf.h" #include "selfdrive/locationd/models/live_kf.h"
using namespace EKFS; using namespace EKFS;
using namespace Eigen; using namespace Eigen;

@ -1,10 +1,10 @@
#pragma once #pragma once
#include "runmodel.h" #include "selfdrive/modeld/runners/runmodel.h"
#include "snpemodel.h" #include "selfdrive/modeld/runners/snpemodel.h"
#if defined(USE_THNEED) #if defined(USE_THNEED)
#include "thneedmodel.h" #include "selfdrive/modeld/runners/thneedmodel.h"
#elif defined(USE_ONNX_MODEL) #elif defined(USE_ONNX_MODEL)
#include "onnxmodel.h" #include "selfdrive/modeld/runners/onnxmodel.h"
#endif #endif

@ -1,7 +1,7 @@
#include <cassert> #include <cassert>
#include <set> #include <set>
#include "json11.hpp" #include "third_party/json11/json11.hpp"
#include "common/util.h" #include "common/util.h"
#include "common/clutil.h" #include "common/clutil.h"
#include "selfdrive/modeld/thneed/thneed.h" #include "selfdrive/modeld/thneed/thneed.h"

@ -12,7 +12,7 @@
#include <CL/cl.h> #include <CL/cl.h>
#include "msm_kgsl.h" #include "third_party/linux/include/msm_kgsl.h"
using namespace std; using namespace std;

@ -1,4 +1,4 @@
#include "map_settings.h" #include "selfdrive/ui/qt/maps/map_settings.h"
#include <utility> #include <utility>

@ -8,7 +8,7 @@
#include <string> #include <string>
#include <thread> #include <thread>
#include "libyuv.h" #include "third_party/libyuv/include/libyuv.h"
#include <jpeglib.h> #include <jpeglib.h>
#include "system/camerad/imgproc/utils.h" #include "system/camerad/imgproc/utils.h"
@ -17,7 +17,7 @@
#include "common/swaglog.h" #include "common/swaglog.h"
#include "common/util.h" #include "common/util.h"
#include "system/hardware/hw.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" #include "system/camerad/cameras/camera_qcom2.h"
#ifdef QCOM2 #ifdef QCOM2

@ -1,6 +1,6 @@
// unittest for set_exposure_target // unittest for set_exposure_target
#include "ae_gray_test.h" #include "system/camerad/test/ae_gray_test.h"
#include <cassert> #include <cassert>

@ -5,7 +5,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include "json11.hpp" #include "third_party/json11/json11.hpp"
#include "cereal/messaging/messaging.h" #include "cereal/messaging/messaging.h"
#include "common/timing.h" #include "common/timing.h"

@ -11,7 +11,7 @@
#define __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS
#include "libyuv.h" #include "third_party/libyuv/include/libyuv.h"
extern "C" { extern "C" {
#include <libavcodec/avcodec.h> #include <libavcodec/avcodec.h>

@ -7,11 +7,11 @@
#include "common/util.h" #include "common/util.h"
#include "common/timing.h" #include "common/timing.h"
#include "libyuv.h" #include "third_party/libyuv/include/libyuv.h"
#include "msm_media_info.h" #include "third_party/linux/include/msm_media_info.h"
// has to be in this order // has to be in this order
#include "v4l2-controls.h" #include "third_party/linux/include/v4l2-controls.h"
#include <linux/videodev2.h> #include <linux/videodev2.h>
#define V4L2_QCOM_BUF_FLAG_CODECCONFIG 0x00020000 #define V4L2_QCOM_BUF_FLAG_CODECCONFIG 0x00020000
#define V4L2_QCOM_BUF_FLAG_EOS 0x02000000 #define V4L2_QCOM_BUF_FLAG_EOS 0x02000000

@ -1,4 +1,4 @@
#include "bmx055_accel.h" #include "system/sensord/sensors/bmx055_accel.h"
#include <cassert> #include <cassert>

@ -1,4 +1,4 @@
#include "bmx055_gyro.h" #include "system/sensord/sensors/bmx055_gyro.h"
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

@ -1,4 +1,4 @@
#include "bmx055_magn.h" #include "system/sensord/sensors/bmx055_magn.h"
#include <unistd.h> #include <unistd.h>

@ -1,4 +1,4 @@
#include "bmx055_temp.h" #include "system/sensord/sensors/bmx055_temp.h"
#include <cassert> #include <cassert>

@ -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) { int16_t read_12_bit(uint8_t lsb, uint8_t msb) {
uint16_t combined = (uint16_t(msb) << 8) | uint16_t(lsb & 0xF0); uint16_t combined = (uint16_t(msb) << 8) | uint16_t(lsb & 0xF0);

@ -1,4 +1,4 @@
#include "lsm6ds3_accel.h" #include "system/sensord/sensors/lsm6ds3_accel.h"
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

@ -1,4 +1,4 @@
#include "lsm6ds3_gyro.h" #include "system/sensord/sensors/lsm6ds3_gyro.h"
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

@ -1,4 +1,4 @@
#include "lsm6ds3_temp.h" #include "system/sensord/sensors/lsm6ds3_temp.h"
#include <cassert> #include <cassert>

@ -1,4 +1,4 @@
#include "mmc5603nj_magn.h" #include "system/sensord/sensors/mmc5603nj_magn.h"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>

@ -1,4 +1,4 @@
#include "ublox_msg.h" #include "system/ubloxd/ublox_msg.h"
#include <unistd.h> #include <unistd.h>

@ -1,5 +1,4 @@
#include "tools/cabana/streams/socketcanstream.h" #include "tools/cabana/streams/socketcanstream.h"
#include "socketcanstream.h"
#include <QLabel> #include <QLabel>
#include <QMessageBox> #include <QMessageBox>

@ -1,8 +1,8 @@
#include "./bitstream.h"
#include <stdbool.h> #include <stdbool.h>
#include <assert.h> #include <assert.h>
#include "bitstream.h"
static const uint32_t BS_MASKS[33] = { static const uint32_t BS_MASKS[33] = {
0, 0x1L, 0x3L, 0x7L, 0xFL, 0x1FL, 0, 0x1L, 0x3L, 0x7L, 0xFL, 0x1FL,
0x3FL, 0x7FL, 0xFFL, 0x1FFL, 0x3FFL, 0x7FFL, 0x3FL, 0x7FL, 0xFFL, 0x1FFL, 0x3FFL, 0x7FFL,

@ -9,7 +9,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mman.h> #include <sys/mman.h>
#include "bitstream.h" #include "./bitstream.h"
#define START_CODE 0x000001 #define START_CODE 0x000001

@ -1,10 +1,11 @@
#include "tools/replay/camera.h" #include "tools/replay/camera.h"
#include "tools/replay/util.h"
#include "msm_media_info.h"
#include <cassert> #include <cassert>
#include <tuple> #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) { 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_width = VENUS_Y_STRIDE(COLOR_FMT_NV12, width);
int nv12_height = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height); int nv12_height = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height);

@ -3,7 +3,7 @@
#include <cassert> #include <cassert>
#include <algorithm> #include <algorithm>
#include "libyuv.h" #include "third_party/libyuv/include/libyuv.h"
#ifdef __APPLE__ #ifdef __APPLE__
#define HW_DEVICE_TYPE AV_HWDEVICE_TYPE_VIDEOTOOLBOX #define HW_DEVICE_TYPE AV_HWDEVICE_TYPE_VIDEOTOOLBOX

Loading…
Cancel
Save