Merge pull request #1156 from gedankenexperimenter/cpplint-update

Update cpplint, with config file changes
pull/1159/head
Jesse Vincent 2 years ago committed by GitHub
commit 40ec622ba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,9 @@
set noparent
extensions=cpp,h,ino
filter=-build/include
filter=-legal/copyright
filter=-readability/namespace
filter=-runtime/references
filter=-whitespace

@ -0,0 +1,9 @@
set noparent
extensions=cpp,h,ino
filter=-build/include
filter=-legal/copyright
filter=-readability/namespace
filter=-runtime/references
filter=-whitespace/line_length

@ -112,11 +112,11 @@ check-formatting:
bin/format-code.sh --check
cpplint-noisy:
-bin/cpplint.py --filter=-legal/copyright,-build/include,-readability/namespace,-whitespace/line_length,-runtime/references --recursive --extensions=cpp,h,ino src examples
-bin/cpplint.py --config=.cpplint-noisy --recursive src plugins examples
cpplint:
bin/cpplint.py --quiet --filter=-whitespace,-legal/copyright,-build/include,-readability/namespace,-runtime/references --recursive --extensions=cpp,h,ino src examples
bin/cpplint.py --config=.cpplint --quiet --recursive src plugins examples
SHELL_FILES := $(shell if [ -d bin ]; then egrep -n -r -l "(env (ba)?sh)|(/bin/(ba)?sh)" bin; fi)

550
bin/cpplint.py vendored

File diff suppressed because it is too large Load Diff

@ -72,7 +72,7 @@ class AutoShift : public Plugin {
public:
// Basic un-checked constructor
constexpr Categories(uint8_t raw_bits)
explicit constexpr Categories(uint8_t raw_bits)
: raw_bits_(raw_bits) {}
static constexpr Categories letterKeys() {

@ -231,8 +231,8 @@ void Model100::setup() {
void Model100::enableHardwareTestMode() {
// Toggle the programming LEDS on
// TODO PORTD |= (1 << 5);
// TOOD PORTB |= (1 << 0);
// TODO(anyone): PORTD |= (1 << 5);
// TOOD(anyone): PORTB |= (1 << 0);
// Disable the debouncer on the ATTinys
KeyScanner::setKeyscanInterval(2);

@ -108,14 +108,11 @@ uint8_t Model100Side::setLEDSPIFrequency(uint8_t frequency) {
// This method will verify that the device is around and ready to talk.
bool Model100Side::isDeviceAvailable() {
return true;
// if the counter is zero, that's the special value that means "we know it's there"
if (unavailable_device_check_countdown_ == 0) {
// if the counter is zero, that's the special value that means "we know it's there"
return true;
}
// if the time to check counter is 1, check for the device
else if (--unavailable_device_check_countdown_ == 0) {
} else if (--unavailable_device_check_countdown_ == 0) {
// if the time to check counter was 1, check for the device
uint8_t wire_result;
Wire.beginTransmission(addr);
wire_result = Wire.endTransmission();
@ -161,7 +158,7 @@ int Model100Side::readRegister(uint8_t cmd) {
return -1;
}
delayMicroseconds(50); // TODO We may be able to drop this in the future
delayMicroseconds(50); // TODO(anyone): We may be able to drop this in the future
// but will need to verify with correctly
// sized pull-ups on both the left and right
// hands' i2c SDA and SCL lines

Loading…
Cancel
Save