File tree 4 files changed +104
-33
lines changed
4 files changed +104
-33
lines changed Original file line number Diff line number Diff line change
1
+ name : codespell
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+ jobs :
11
+ codespell :
12
+ name : Check for spelling errors
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v3
18
+
19
+ # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
20
+ - name : Spell check
21
+ uses : codespell-project/actions-codespell@master
22
+ with :
23
+ check_filenames : true
24
+ check_hidden : true
25
+ # In the event of a false positive, add the word in all lower case to this file:
26
+ ignore_words_file : ./extras/codespell-ignore-words-list.txt
Original file line number Diff line number Diff line change 15
15
# Allows you to run this workflow manually from the Actions tab
16
16
workflow_dispatch :
17
17
jobs :
18
- astyle_check :
19
- runs-on : ubuntu-latest
20
- name : AStyle check
21
- steps :
22
- # First of all, clone the repo using the checkout action.
23
- - name : Checkout
24
- uses : actions/checkout@main
25
-
26
- - name : Astyle check
27
- id : Astyle
28
- uses : stm32duino/actions/astyle-check@main
29
-
30
- # Use the output from the `Astyle` step
31
- - name : Astyle Errors
32
- if : failure()
33
- run : |
34
- cat ${{ steps.Astyle.outputs.astyle-result }}
35
- exit 1
36
- codespell :
37
- name : Check for spelling errors
38
- runs-on : ubuntu-latest
39
- steps :
40
- - name : Checkout
41
- uses : actions/checkout@main
42
-
43
- # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
44
- - name : Spell check
45
- uses : codespell-project/actions-codespell@master
46
- with :
47
- check_filenames : true
48
- check_hidden : true
49
- # In the event of a false positive, add the word in all lower case to this file:
50
- ignore_words_file : ./extras/codespell-ignore-words-list.txt
51
18
lib_build :
52
19
runs-on : ubuntu-latest
53
20
name : Library compilation
Original file line number Diff line number Diff line change
1
+ name : Check code formatting with astyle
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+ # Allows you to run this workflow manually from the Actions tab
7
+ workflow_dispatch :
8
+ jobs :
9
+ check :
10
+ name : Check for astyle errors
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - run : sudo apt install astyle
15
+ - uses : actions/checkout@v3
16
+ - run : astyle --project=extras/.astylerc --recursive '*.c*' '*.h'
17
+ # If anything changed, this will fail and show the needed changes
18
+ - run : git diff --exit-code
Original file line number Diff line number Diff line change
1
+ # STM32duino code style definition file for astyle
2
+
3
+ # Don't create backup files, let git handle it
4
+ suffix=none
5
+
6
+ # K&R style
7
+ style=kr
8
+
9
+ # 1 TBS addition to k&r, add braces to one liners
10
+ # Use -j as it was changed in astyle from brackets to braces, this way it is compatible with older astyle versions
11
+ -j
12
+
13
+ # 2 spaces, convert tabs to spaces
14
+ indent=spaces=2
15
+ convert-tabs
16
+ lineend=linux
17
+
18
+ # Indent switches and cases
19
+ indent-classes
20
+ indent-switches
21
+ indent-cases
22
+ indent-col1-comments
23
+ indent-preproc-block
24
+
25
+ # Remove spaces in and around parentheses
26
+ unpad-paren
27
+
28
+ # Insert a space after if, while, for, and around operators
29
+ pad-header
30
+ pad-oper
31
+
32
+ # Pointer/reference operators go next to the name (on the right)
33
+ align-pointer=name
34
+ align-reference=name
35
+
36
+ # Attach { for classes and namespaces
37
+ attach-namespaces
38
+ attach-classes
39
+
40
+ # Extend longer lines, define maximum 120 value. This results in aligned code,
41
+ # otherwise the lines are broken and not consistent
42
+ max-continuation-indent=120
43
+
44
+ # if you like one-liners, keep them
45
+ keep-one-line-statements
46
+
47
+ #remove-comment-prefix
48
+
49
+ # Do not error our when a directory is excluded that does not contain
50
+ # any files to process
51
+ ignore-exclude-errors
52
+
53
+ # Exclude some files
54
+ exclude=.git
55
+ exclude=docs
56
+ exclude=api-docs
57
+
58
+ # Allow oneline blocks, to allow very small functions to be defined
59
+ # on a single line in header files.
60
+ keep-one-line-blocks
You can’t perform that action at this time.
0 commit comments