Skip to content

Commit

Permalink
Ensure single newline at EOF for core files (qmk#11310)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and drashna committed Jan 13, 2021
1 parent 60fd4d6 commit 4dd0306
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 45 deletions.
2 changes: 1 addition & 1 deletion build_full_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ $(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))

$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
$(TEST)_CONFIG=$(TEST_PATH)/config.h
VPATH+=$(TOP_DIR)/tests/test_common
VPATH+=$(TOP_DIR)/tests/test_common
5 changes: 2 additions & 3 deletions build_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
GTEST_INC := \
$(LIB_PATH)/googletest/googletest/include\
$(LIB_PATH)/googletest/googlemock/include\

GTEST_INTERNAL_INC :=\
$(LIB_PATH)/googletest/googletest\
$(LIB_PATH)/googletest/googlemock
Expand All @@ -27,7 +27,7 @@ $(GTEST_OUTPUT)_SRC :=\
googletest/src/gtest_main.cc\
googlemock/src/gmock-all.cc

$(GTEST_OUTPUT)_DEFS :=
$(GTEST_OUTPUT)_DEFS :=
$(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)

LDFLAGS += -lstdc++ -lpthread -shared-libgcc
Expand Down Expand Up @@ -66,4 +66,3 @@ include $(TMK_PATH)/rules.mk

$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)

2 changes: 1 addition & 1 deletion drivers/haptic/DRV2605L.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,4 @@ typedef union DRVREG_CTRL5 { /* register 0x1F */
uint8_t C5_LRA_AUTO_OPEN_LOOP : 1;
uint8_t C5_AUTO_OL_CNT : 2;
} Bits;
} DRVREG_CTRL5;
} DRVREG_CTRL5;
2 changes: 1 addition & 1 deletion drivers/ugfx/gdisp/is31fl3731c/driver.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
GFXINC += drivers/ugfx/gdisp/is31fl3731c
GFXSRC += drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c
GDISP_DRIVER_LIST += GDISPVMT_IS31FL3731C_QMK
GDISP_DRIVER_LIST += GDISPVMT_IS31FL3731C_QMK
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* It is chip dependent, the correct number can be looked up here:
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
*/
#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400
#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400
2 changes: 1 addition & 1 deletion platforms/chibios/GENERIC_STM32_F042X6/configs/mcuconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3

#endif /* _MCUCONF_H_ */
#endif /* _MCUCONF_H_ */
2 changes: 1 addition & 1 deletion quantum/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ __attribute__((weak)) void led_set(uint8_t usb_led) {

led_set_kb(usb_led);
led_update_kb((led_t)usb_led);
}
}
2 changes: 1 addition & 1 deletion quantum/pointing_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ __attribute__((weak)) void pointing_device_task(void) {

report_mouse_t pointing_device_get_report(void) { return mouseReport; }

void pointing_device_set_report(report_mouse_t newMouseReport) { mouseReport = newMouseReport; }
void pointing_device_set_report(report_mouse_t newMouseReport) { mouseReport = newMouseReport; }
2 changes: 1 addition & 1 deletion quantum/serial_link/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# qmk_serial_link
# qmk_serial_link
16 changes: 8 additions & 8 deletions quantum/serial_link/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# The MIT License (MIT)
#
#
# Copyright (c) 2016 Fred Sundvik
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -21,7 +21,7 @@
# SOFTWARE.

CC = gcc
CFLAGS =
CFLAGS =
INCLUDES = -I. -I../../
LDFLAGS = -L$(BUILDDIR)/cgreen/build-c/src -shared
LDLIBS = -lcgreen
Expand All @@ -37,7 +37,7 @@ endif
ifneq (, $(findstring CYGWIN, $(UNAME)))
EXT = .dll
endif

SRC = $(wildcard *.c)
TESTFILES = $(patsubst %.c, $(UNITTESTS)/%$(EXT), $(SRC))
$(shell mkdir -p $(DEPDIR) >/dev/null)
Expand All @@ -54,8 +54,8 @@ $(UNITOBJ)/%.o: %.c $(DEPDIR)/%.d
@mkdir -p $(UNITOBJ)
$(CC) $(CFLAGS) $(DEPFLAGS) $(INCLUDES) -c $< -o $@
@mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d

$(DEPDIR)/%.d: ;
.PRECIOUS: $(DEPDIR)/%.d

-include $(patsubst %,$(DEPDIR)/%.d,$(basename $(SRC)))
-include $(patsubst %,$(DEPDIR)/%.d,$(basename $(SRC)))
2 changes: 1 addition & 1 deletion quantum/serial_link/tests/testlist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ TEST_LIST +=\
serial_link_frame_validator\
serial_link_frame_router\
serial_link_triple_buffered_object\
serial_link_transport
serial_link_transport
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,3 @@ split_penalty_logical_operator=300

# Use the Tab character for indentation.
use_tabs=False

2 changes: 1 addition & 1 deletion testlist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ define VALIDATE_TEST_LIST
endef


$(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST))))
$(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST))))
5 changes: 1 addition & 4 deletions tests/basic/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TESTS_BASIC_CONFIG_H_
#define TESTS_BASIC_CONFIG_H_
#pragma once

#define MATRIX_ROWS 4
#define MATRIX_COLS 10

#endif /* TESTS_BASIC_CONFIG_H_ */
2 changes: 1 addition & 1 deletion tests/basic/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

CUSTOM_MATRIX=yes
CUSTOM_MATRIX=yes
2 changes: 1 addition & 1 deletion tests/basic/test_macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ TEST_F(Macro, PlayASimpleMacro) {
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(210);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220);
run_one_scan_loop();
}
}
2 changes: 1 addition & 1 deletion tests/test_common/keyboard_report_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ bool KeyboardReportMatcher::MatchAndExplain(report_keyboard_t& report, MatchResu

void KeyboardReportMatcher::DescribeTo(::std::ostream* os) const { *os << "is equal to " << m_report; }

void KeyboardReportMatcher::DescribeNegationTo(::std::ostream* os) const { *os << "is not equal to " << m_report; }
void KeyboardReportMatcher::DescribeNegationTo(::std::ostream* os) const { *os << "is not equal to " << m_report; }
2 changes: 1 addition & 1 deletion tests/test_common/keyboard_report_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t
template<typename... Ts>
inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
}
}
8 changes: 2 additions & 6 deletions tests/test_common/test_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_
#define TESTS_TEST_COMMON_TEST_DRIVER_H_
#pragma once

#include "gmock/gmock.h"
#include <stdint.h>
Expand All @@ -28,7 +27,7 @@ class TestDriver {
TestDriver();
~TestDriver();
void set_leds(uint8_t leds) { m_leds = leds; }

MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&));
MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&));
MOCK_METHOD1(send_system_mock, void (uint16_t));
Expand All @@ -43,6 +42,3 @@ class TestDriver {
uint8_t m_leds = 0;
static TestDriver* m_this;
};


#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */
4 changes: 2 additions & 2 deletions tests/test_common/test_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
#pragma once

#include "gtest/gtest.h"

Expand All @@ -27,4 +27,4 @@ class TestFixture : public testing::Test {

void run_one_scan_loop();
void idle_for(unsigned ms);
};
};
4 changes: 1 addition & 3 deletions tmk_core/common/avr/xprintf.S
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ xatoi:
brcs 70f ;/
cpi r22, 10 ;if(r22 >= 10) {
brcs 53f ; r22 -= 7;
subi r22, 7 ; if(r22 < 10)
subi r22, 7 ; if(r22 < 10)
cpi r22, 10 ;
brcs 70f ;}
53: cp r22, r25 ;if(r22 >= r25) error;
Expand Down Expand Up @@ -496,5 +496,3 @@ xatoi:
ret
.endfunc
#endif


2 changes: 1 addition & 1 deletion tmk_core/common/chibios/sleep_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ void sleep_led_toggle(void) {
// not implemented
}

#endif /* platform selection */
#endif /* platform selection */
2 changes: 1 addition & 1 deletion tmk_core/common/test/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), l
void set_time(uint32_t t) { current_time = t; }
void advance_time(uint32_t ms) { current_time += ms; }

void wait_ms(uint32_t ms) { advance_time(ms); }
void wait_ms(uint32_t ms) { advance_time(ms); }
1 change: 0 additions & 1 deletion tmk_core/protocol/chibios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ OPT_DEFS += -DFIXED_NUM_CONFIGURATIONS=1
ifeq ($(strip $(MIDI_ENABLE)), yes)
include $(TMK_PATH)/protocol/midi.mk
endif

2 changes: 1 addition & 1 deletion util/new_keymap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ printf "%s keymap directory created in: qmk_firmware/keyboards/%s/keymaps/\n\n"

printf "Compile a firmware file with your new keymap by typing: \n"
printf " make %s:%s\n" "$KB_PATH" "$USERNAME"
printf "from the qmk_firmware directory\n"
printf "from the qmk_firmware directory\n"

0 comments on commit 4dd0306

Please sign in to comment.