From 4f2a5bcebb2d81631dfe9a21d45913254f1626f2 Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Tue, 22 Sep 2020 19:55:59 +0200 Subject: [PATCH 1/2] Add continuous integration check --- .github/workflows/Continuous-Integration.yml | 61 ++++++++++++++++++++ extras/codespell-ignore-words-list.txt | 2 + 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/Continuous-Integration.yml create mode 100644 extras/codespell-ignore-words-list.txt diff --git a/.github/workflows/Continuous-Integration.yml b/.github/workflows/Continuous-Integration.yml new file mode 100644 index 0000000..6c4d96b --- /dev/null +++ b/.github/workflows/Continuous-Integration.yml @@ -0,0 +1,61 @@ +name: VL53L1 Continuous Integration +on: + push: + branches: + - master + paths-ignore: + - '*' + - '**.md' + - '**.txt' + pull_request: + paths-ignore: + - '*' + - '**.md' + - '**.txt' +jobs: + astyle_check: + runs-on: ubuntu-latest + name: AStyle check + steps: + # First of all, clone the repo using the checkout action. + - name: Checkout + uses: actions/checkout@master + + - name: Astyle check + id: Astyle + uses: stm32duino/actions/astyle-check@master + + # Use the output from the `Astyle` step + - name: Astyle Errors + if: failure() + run: | + cat ${{ steps.Astyle.outputs.astyle-result }} + exit 1 + spell-check: + runs-on: ubuntu-latest + name: Spell check + steps: + - uses: actions/checkout@master + - uses: arduino/actions/libraries/spell-check@master + with: + ignore-words-list: "./extras/codespell-ignore-words-list.txt" + lib_build: + runs-on: ubuntu-latest + name: Library compilation + steps: + # First of all, clone the repo using the checkout action. + - name: Checkout + uses: actions/checkout@master + + - name: Compilation + id: Compile + uses: stm32duino/actions/compile-examples@master + with: + board-pattern: "NUCLEO_L476RG" + + # Use the output from the `Compile` step + - name: Compilation Errors + if: failure() + run: | + cat ${{ steps.Compile.outputs.compile-result }} + exit 1 \ No newline at end of file diff --git a/extras/codespell-ignore-words-list.txt b/extras/codespell-ignore-words-list.txt new file mode 100644 index 0000000..565d489 --- /dev/null +++ b/extras/codespell-ignore-words-list.txt @@ -0,0 +1,2 @@ +hist +pres \ No newline at end of file From af1334f9364805b9821ade38e6b61e2cbe29f3bc Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Tue, 22 Sep 2020 19:59:53 +0200 Subject: [PATCH 2/2] Fix code spelling check --- src/ComponentObject.h | 2 +- src/vl53l1_def.h | 8 ++++---- src/vl53l1_error_codes.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ComponentObject.h b/src/ComponentObject.h index 35d26da..a943e6d 100644 --- a/src/ComponentObject.h +++ b/src/ComponentObject.h @@ -56,7 +56,7 @@ class ComponentObject { public: /** * @brief Initializing the component. - * @param[in] init pointer to device specific initalization structure. + * @param[in] init pointer to device specific initialization structure. * @retval "0" in case of success, an error code otherwise. */ virtual int Init() = 0; diff --git a/src/vl53l1_def.h b/src/vl53l1_def.h index a84cae4..c8838d9 100644 --- a/src/vl53l1_def.h +++ b/src/vl53l1_def.h @@ -392,13 +392,13 @@ typedef uint8_t VL53L1_State; typedef uint8_t VL53L1_SmudgeCorrectionModes; #define VL53L1_SMUDGE_CORRECTION_NONE ((VL53L1_SmudgeCorrectionModes) 0) -/*!< Smudge correction is applied continously accross the rangings */ +/*!< Smudge correction is applied continuously across the rangings */ #define VL53L1_SMUDGE_CORRECTION_CONTINUOUS ((VL53L1_SmudgeCorrectionModes) 1) -/*!< Smudge correction is applied continously accross the rangings */ +/*!< Smudge correction is applied continuously across the rangings */ #define VL53L1_SMUDGE_CORRECTION_SINGLE ((VL53L1_SmudgeCorrectionModes) 2) -/*!< Smudge correction is applied only once accross the rangings */ +/*!< Smudge correction is applied only once across the rangings */ #define VL53L1_SMUDGE_CORRECTION_DEBUG ((VL53L1_SmudgeCorrectionModes) 3) -/*!< Smudge detection is applied continously but Xtalk values are not +/*!< Smudge detection is applied continuously but Xtalk values are not * updated automatically within the driver */ diff --git a/src/vl53l1_error_codes.h b/src/vl53l1_error_codes.h index 7f5322c..5959464 100644 --- a/src/vl53l1_error_codes.h +++ b/src/vl53l1_error_codes.h @@ -142,7 +142,7 @@ typedef int8_t VL53L1_Error; /*!< Zone dynamic config GPH ID check failed - API out of sync */ #define VL53L1_ERROR_XTALK_EXTRACTION_NO_SAMPLE_FAIL ((VL53L1_Error) - 22) -/*!< Thrown when run_xtalk_extraction fn has 0 succesful samples +/*!< Thrown when run_xtalk_extraction fn has 0 successful samples * when using the full array to sample the xtalk. In this case there is * not enough information to generate new Xtalk parm info. The function * will exit and leave the current xtalk parameters unaltered @@ -237,7 +237,7 @@ typedef int8_t VL53L1_Error; * notification only, xtalk pulse and shape have still been generated */ #define VL53L1_WARNING_XTALK_NO_SAMPLES_FOR_GRADIENT ((VL53L1_Error) - 39) -/*!< Thrown to notify that some of teh xtalk samples used for gradient +/*!< Thrown to notify that some of the xtalk samples used for gradient * generation did not yield valid ranging pulse data while attempting to * measure the xtalk signal in vl53l1_run_xtalk_extract(). This can * signify that any one of the zones 0-3 yielded no successful samples.