Fixed cpplint.py warnings (#215)

* Fixed cpplint.py [build/include_order] and [build/include_what_you_use] warnings
* Fixed cpplint.py [readability/casting] warnings
* Updated .styleguide format
* Fixed cpplint.py [build/header_guard] warnings
This commit is contained in:
Tyler Veness
2016-09-05 13:55:31 -07:00
committed by Peter Johnson
parent 59ec54887d
commit 05626cfafe
132 changed files with 280 additions and 172 deletions

View File

@@ -5,14 +5,13 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "AnalogInput.h"
#include "AnalogOutput.h"
#include "AnalogTrigger.h"
#include "Counter.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static const double kDelayTime = 0.01;

View File

@@ -7,12 +7,11 @@
#include "AnalogPotentiometer.h"
#include "gtest/gtest.h"
#include "AnalogOutput.h"
#include "ControllerPower.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static const double kScale = 270.0;
static const double kAngle = 180.0;

View File

@@ -7,9 +7,8 @@
#include "BuiltInAccelerometer.h"
#include "gtest/gtest.h"
#include "Timer.h"
#include "gtest/gtest.h"
static constexpr double kAccelerationTolerance = 0.1;
/**

View File

@@ -7,14 +7,13 @@
#include "CANJaguar.h"
#include "gtest/gtest.h"
#include "AnalogOutput.h"
#include "DigitalOutput.h"
#include "Relay.h"
#include "TestBench.h"
#include "Timer.h"
#include "WPIErrors.h"
#include "gtest/gtest.h"
static constexpr double kSpikeTime = 0.5;

View File

@@ -7,10 +7,9 @@
#include "CANTalon.h"
#include "gtest/gtest.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
const int deviceId = 0;

View File

@@ -7,10 +7,10 @@
#include "CircularBuffer.h"
#include "gtest/gtest.h"
#include <array>
#include "gtest/gtest.h"
static const std::array<double, 10> values = {
751.848, 766.366, 342.657, 234.252, 716.126,
132.344, 445.697, 22.727, 421.125, 799.913};

View File

@@ -11,11 +11,10 @@
#include <mutex>
#include <thread>
#include "gtest/gtest.h"
#include "HAL/cpp/priority_condition_variable.h"
#include "HAL/cpp/priority_mutex.h"
#include "TestBench.h"
#include "gtest/gtest.h"
namespace wpilib {
namespace testing {

View File

@@ -7,13 +7,12 @@
#include "Counter.h"
#include "gtest/gtest.h"
#include "Jaguar.h"
#include "Talon.h"
#include "TestBench.h"
#include "Timer.h"
#include "Victor.h"
#include "gtest/gtest.h"
static const double kMotorDelay = 2.5;

View File

@@ -8,12 +8,11 @@
#include "DigitalInput.h"
#include "DigitalOutput.h"
#include "gtest/gtest.h"
#include "Counter.h"
#include "InterruptableSensorBase.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static const double kCounterTime = 0.001;

View File

@@ -7,11 +7,10 @@
#include "DigitalGlitchFilter.h"
#include "gtest/gtest.h"
#include "Counter.h"
#include "DigitalInput.h"
#include "Encoder.h"
#include "gtest/gtest.h"
/**
* Tests that configuring inputs to be filtered succeeds.

View File

@@ -7,13 +7,12 @@
#include "Encoder.h"
#include "gtest/gtest.h"
#include "AnalogOutput.h"
#include "AnalogTrigger.h"
#include "DigitalOutput.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static const double kDelayTime = 0.001;

View File

@@ -5,18 +5,18 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "Filters/LinearDigitalFilter.h"
#include "Filters/LinearDigitalFilter.h" // NOLINT(build/include_order)
#include <math.h>
#include <functional>
#include <memory>
#include <random>
#include <thread>
#include "gtest/gtest.h"
#include "Base.h"
#include "TestBench.h"
#include "gtest/gtest.h"
enum FilterNoiseTestType { TEST_SINGLE_POLE_IIR, TEST_MOVAVG };

View File

@@ -5,18 +5,18 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "Filters/LinearDigitalFilter.h"
#include "Filters/LinearDigitalFilter.h" // NOLINT(build/include_order)
#include <math.h>
#include <functional>
#include <memory>
#include <random>
#include <thread>
#include "gtest/gtest.h"
#include "Base.h"
#include "TestBench.h"
#include "gtest/gtest.h"
enum FilterOutputTestType { TEST_SINGLE_POLE_IIR, TEST_HIGH_PASS, TEST_MOVAVG };

View File

@@ -5,8 +5,6 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "Encoder.h"
#include "Jaguar.h"
#include "PIDController.h"
@@ -14,6 +12,7 @@
#include "TestBench.h"
#include "Timer.h"
#include "Victor.h"
#include "gtest/gtest.h"
enum MotorEncoderTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };

View File

@@ -5,14 +5,13 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "Encoder.h"
#include "Jaguar.h"
#include "Talon.h"
#include "TestBench.h"
#include "Timer.h"
#include "Victor.h"
#include "gtest/gtest.h"
enum MotorInvertingTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };
static const double motorSpeed = 0.15;

View File

@@ -5,15 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "HAL/cpp/priority_mutex.h"
#include "HAL/cpp/priority_mutex.h" // NOLINT(build/include_order)
#include <atomic>
#include <condition_variable>
#include <thread>
#include "gtest/gtest.h"
#include "TestBench.h"
#include "gtest/gtest.h"
namespace wpilib {
namespace testing {

View File

@@ -7,10 +7,9 @@
#include "Notifier.h"
#include "gtest/gtest.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
unsigned notifierCounter;

View File

@@ -5,8 +5,6 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "AnalogInput.h"
#include "Compressor.h"
#include "DigitalInput.h"
@@ -15,6 +13,7 @@
#include "Solenoid.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
/* The PCM switches the compressor up to a couple seconds after the pressure
switch changes. */

View File

@@ -5,13 +5,12 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "PIDController.h"
#include "PIDOutput.h"
#include "PIDSource.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
class PIDToleranceTest : public testing::Test {
protected:

View File

@@ -7,13 +7,12 @@
#include "PowerDistributionPanel.h"
#include "gtest/gtest.h"
#include "Jaguar.h"
#include "Talon.h"
#include "TestBench.h"
#include "Timer.h"
#include "Victor.h"
#include "gtest/gtest.h"
static const double kMotorTime = 0.25;

View File

@@ -5,14 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "Preferences.h"
#include "Preferences.h" // NOLINT(build/include_order)
#include <stdio.h>
#include <fstream>
#include "gtest/gtest.h"
#include "Timer.h"
#include "gtest/gtest.h"
#include "ntcore.h"
static const char* kFileName = "networktables.ini";

View File

@@ -7,11 +7,10 @@
#include "Relay.h"
#include "gtest/gtest.h"
#include "DigitalInput.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static const double kDelayTime = 0.01;

View File

@@ -5,11 +5,10 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "DriverStation.h"
#include "LiveWindow/LiveWindow.h"
#include "Timer.h"
#include "gtest/gtest.h"
class TestEnvironment : public testing::Environment {
bool m_alreadySetUp = false;

View File

@@ -5,13 +5,12 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "ADXL345_SPI.h"
#include "AnalogGyro.h"
#include "Servo.h"
#include "TestBench.h"
#include "Timer.h"
#include "gtest/gtest.h"
static constexpr double kServoResetTime = 2.0;

View File

@@ -7,9 +7,8 @@
#include "Timer.h"
#include "gtest/gtest.h"
#include "TestBench.h"
#include "gtest/gtest.h"
static const double kWaitTime = 0.5;

View File

@@ -5,8 +5,6 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "gtest/gtest.h"
#include "Commands/CommandGroup.h"
#include "Commands/Scheduler.h"
#include "Commands/Subsystem.h"
@@ -14,6 +12,7 @@
#include "RobotState.h"
#include "Timer.h"
#include "command/MockCommand.h"
#include "gtest/gtest.h"
class CommandTest : public testing::Test {
protected: