From 34c9d8be50f56981a599a52ffa8e211c30d3a4bb Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 19 Feb 2022 14:46:27 +0100 Subject: [PATCH] Lint trailing whitespace (#3230) --- .github/ISSUE_TEMPLATE/config.yml | 1 - .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- CONTRIBUTING.md | 2 +- esphome/components/fujitsu_general/fujitsu_general.h | 10 +++++----- esphome/components/ili9341/ili9341_init.h | 8 ++++---- script/ci-custom.py | 5 +++++ tests/component_tests/button/test_button.yaml | 1 - 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4add58dfbe..7f99701e39 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -9,4 +9,3 @@ contact_links: - name: Frequently Asked Question url: https://esphome.io/guides/faq.html about: Please view the FAQ for common questions and what to include in a bug report. - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 25411c19f5..f9c8cce0af 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -# What does this implement/fix? +# What does this implement/fix? Quick description and explanation of changes @@ -35,6 +35,6 @@ Quick description and explanation of changes ## Checklist: - [ ] The code change is tested and works locally. - [ ] Tests have been added to verify that the new code works (under `tests/` folder). - + If user exposed functionality or configuration variables are added/changed: - [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e96bb5745b..ec23656763 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ For a detailed guide, please see https://esphome.io/guides/contributing.html#con Things to note when contributing: - Please test your changes :) - - If a new feature is added or an existing user-facing feature is changed, you should also + - If a new feature is added or an existing user-facing feature is changed, you should also update the [docs](https://github.com/esphome/esphome-docs). See [contributing to esphome-docs](https://esphome.io/guides/contributing.html#contributing-to-esphomedocs) for more information. - Please also update the tests in the `tests/` folder. You can do so by just adding a line in one of the YAML files diff --git a/esphome/components/fujitsu_general/fujitsu_general.h b/esphome/components/fujitsu_general/fujitsu_general.h index 8dc7a3e484..ee83ae9d19 100644 --- a/esphome/components/fujitsu_general/fujitsu_general.h +++ b/esphome/components/fujitsu_general/fujitsu_general.h @@ -17,29 +17,29 @@ const uint8_t FUJITSU_GENERAL_TEMP_MAX = 30; // Celsius * turn * on temp mode fan swing * * | | | | | | * - * + * * temperatures 1 1248 124 124 1 * auto auto 18 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000100 00000000 00000000 00000000 00000000 00000000 00000100 11110001 * auto auto 19 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10001100 00000000 00000000 00000000 00000000 00000000 00000100 11111110 * auto auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00000000 00000000 00000000 00000000 00000000 00000100 11110011 - * + * * on flag: * on at 16 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000000 00100000 00000000 00000000 00000000 00000000 00000100 11010101 * down to 16 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000000 00100000 00000000 00000000 00000000 00000000 00000100 00110101 - * + * * mode options: * auto auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00000000 00000000 00000000 00000000 00000000 00000100 11110011 * cool auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 10000000 00000000 00000000 00000000 00000000 00000100 01110011 * dry auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 01000000 00000000 00000000 00000000 00000000 00000100 10110011 * fan (auto) (30) 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 11000000 00000000 00000000 00000000 00000000 00000100 00110011 * heat auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00100000 00000000 00000000 00000000 00000000 00000100 11010011 - * + * * fan options: * heat 30 high 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00100000 10000000 00000000 00000000 00000000 00000100 01010011 * heat 30 med 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 01000000 00000000 00000000 00000000 00000100 01010011 * heat 30 low 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 11000000 00000000 00000000 00000000 00000100 10010011 * heat 30 quiet 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00100000 00000000 00000000 00000000 00000100 00010011 - * + * * swing options: * heat 30 swing vert 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00101000 00000000 00000000 00000000 00000100 00011101 * heat 30 noswing 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00100000 00000000 00000000 00000000 00000100 00010011 diff --git a/esphome/components/ili9341/ili9341_init.h b/esphome/components/ili9341/ili9341_init.h index 9282895e2e..b4f67ff19a 100644 --- a/esphome/components/ili9341/ili9341_init.h +++ b/esphome/components/ili9341/ili9341_init.h @@ -25,10 +25,10 @@ static const uint8_t PROGMEM INITCMD_M5STACK[] = { 0xF2, 1, 0x00, // 3Gamma Function Disable ILI9341_GAMMASET , 1, 0x01, // Gamma curve selected ILI9341_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma - 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, + 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, ILI9341_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma - 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, + 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, ILI9341_SLPOUT , 0x80, // Exit Sleep ILI9341_DISPON , 0x80, // Display on @@ -55,10 +55,10 @@ static const uint8_t PROGMEM INITCMD_TFT[] = { 0xF2, 1, 0x00, // 3Gamma Function Disable ILI9341_GAMMASET , 1, 0x01, // Gamma curve selected ILI9341_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma - 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, + 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, ILI9341_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma - 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, + 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, ILI9341_SLPOUT , 0x80, // Exit Sleep ILI9341_DISPON , 0x80, // Display on diff --git a/script/ci-custom.py b/script/ci-custom.py index 2703e7d311..c0737da103 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -591,6 +591,11 @@ def lint_inclusive_language(fname, match): ) +@lint_re_check(r"[\t\r\f\v ]+$") +def lint_trailing_whitespace(fname, match): + return "Trailing whitespace detected" + + @lint_content_find_check( "ESP_LOG", include=["*.h", "*.tcc"], diff --git a/tests/component_tests/button/test_button.yaml b/tests/component_tests/button/test_button.yaml index 3eac129e8c..32d2e8d93b 100644 --- a/tests/component_tests/button/test_button.yaml +++ b/tests/component_tests/button/test_button.yaml @@ -18,4 +18,3 @@ button: name: wol_test_2 id: wol_2 internal: false -