summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-12-04 20:29:24 +0700
committerhathach <[email protected]>2022-12-04 20:29:24 +0700
commite3df3ac5ce3d8ccb4c8b52eeaf0fef3ebd91eb14 (patch)
tree1b928768e572b35d2c87f23fece28e611547e0c8
parentd6d2499ad6d85cbc5f27a2917c04cca4aa1144ba (diff)
add codespell config and ci run
-rw-r--r--.codespell/exclude-file.txt1
-rw-r--r--.codespellrc8
-rw-r--r--.github/workflows/build_arm.yml4
-rw-r--r--.github/workflows/pre-commit.yml24
4 files changed, 37 insertions, 0 deletions
diff --git a/.codespell/exclude-file.txt b/.codespell/exclude-file.txt
new file mode 100644
index 000000000..af8265cc7
--- /dev/null
+++ b/.codespell/exclude-file.txt
@@ -0,0 +1 @@
+ return USB0.INTSTS1.BIT.ATTCH ? true : false;
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 000000000..0e1bc1483
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,8 @@
+# See: https://github.com/codespell-project/codespell#using-a-config-file
+[codespell]
+# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
+ignore-words-list = synopsys, sie, tre, hsi, fro, dout, mot, te
+check-filenames =
+check-hidden =
+skip = .cproject,./.git,./hw/mcu,./lib,./examples/*/*/_build,./examples/*/*/ses,./examples/*/*/ozone,./hw/mcu,./test/vendor,./tests_obsolete
+exclude-file = .codespell/exclude-file.txt
diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml
index 369048fc6..0dab46d0f 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -7,6 +7,10 @@ on:
types:
- created
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
# ---------------------------------------
# Unit testing with Ceedling
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
new file mode 100644
index 000000000..7baf66e72
--- /dev/null
+++ b/.github/workflows/pre-commit.yml
@@ -0,0 +1,24 @@
+name: pre-commit
+
+on:
+ pull_request:
+ push:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ pre-commit:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v3
+
+ - name: Check Code Spelling
+ uses: codespell-project/actions-codespell@master \ No newline at end of file