Skip to content

Commit 10a9d00

Browse files
authored
Added clang-format (1technophile#623)
* added .clang-format * added names to travis jobs removed deprecated travis option * check github action * added .gitignore
1 parent 661ef9c commit 10a9d00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2898
-3646
lines changed

.clang-format

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BasedOnStyle: Google
2+
Language: Cpp
3+
ColumnLimit: 0
4+
IndentWidth: 2
5+
TabWidth: 2
6+
UseTab: Never
7+
IndentPPDirectives: AfterHash
8+
ReflowComments: false
9+
SpacesBeforeTrailingComments: 1
10+
AlignConsecutiveMacros: true
11+
AlignTrailingComments: false
12+
AccessModifierOffset: -2
13+
DerivePointerAlignment: false
14+
PointerAlignment: Left

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = false
8+
insert_final_newline = true

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check Code Format
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Check main format
12+
uses: DoozyX/[email protected]
13+
with:
14+
source: "./main"
15+
extensions: "h,ino"
16+
clangFormatVersion: 9
17+
- name: Check test format
18+
uses: DoozyX/[email protected]
19+
with:
20+
source: "./test"
21+
extensions: "h,ino"
22+
clangFormatVersion: 9

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.pio
2+
.vscode

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,21 @@
1919
# Travis CI documentation (see above).
2020
#
2121

22-
2322
#
2423
# Template #1: General project. Test it using existing `platformio.ini`.
2524
#
26-
matrix:
25+
jobs:
2726
include:
28-
- language: python
27+
- name: "Build and deploy with PlatformIO"
28+
language: python
2929
python: 2.7
30-
sudo: false
3130
cache:
32-
directories:
33-
- "~/.platformio"
31+
directories:
32+
- "~/.platformio"
3433
install:
3534
- pip install -U platformio
3635
- platformio update
37-
script:
36+
script:
3837
- sed -i 's/version_tag/'$TRAVIS_TAG'/g' main/User_config.h
3938
- platformio run
4039
- bash scripts/prepare_deploy.sh
@@ -52,7 +51,8 @@ matrix:
5251
- toDeploy/*
5352
skip_cleanup: true
5453

55-
- language: node_js
54+
- name: "Build and deploy docs"
55+
language: node_js
5656
node_js:
5757
- lts/*
5858
install:
@@ -63,10 +63,10 @@ matrix:
6363
before_deploy: echo "docs.openmqttgateway.com" >> docs/.vuepress/dist/CNAME
6464
deploy:
6565
provider: pages
66-
skip-cleanup: true
66+
skip_cleanup: true
6767
local_dir: docs/.vuepress/dist
68-
github-token: $GITHUB_TOKEN # a token generated on github allowing travis to push code on you repository
69-
keep-history: true
68+
github_token: $GITHUB_TOKEN # a token generated on github allowing travis to push code on you repository
69+
keep_history: true
7070
on:
7171
repo: 1technophile/OpenMQTTGateway
7272
all_branches: true

0 commit comments

Comments
 (0)