Skip to content

Commit 9b73803

Browse files
authored
Add Github action and fix line ending (#21)
1 parent 97f88f1 commit 9b73803

File tree

6 files changed

+523
-454
lines changed

6 files changed

+523
-454
lines changed

.clang-format

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# We'll use defaults from the LLVM style, but with 4 columns indentation.
3+
BasedOnStyle: LLVM
4+
IndentWidth: 2
5+
---
6+
Language: Cpp
7+
DeriveLineEnding: false
8+
UseCRLF: true
9+
DerivePointerAlignment: false
10+
PointerAlignment: Left
11+
AlignConsecutiveAssignments: true
12+
AllowShortFunctionsOnASingleLine: Inline
13+
AllowShortIfStatementsOnASingleLine: Never
14+
AllowShortLambdasOnASingleLine: Empty
15+
AlwaysBreakTemplateDeclarations: Yes
16+
AccessModifierOffset: -2
17+
AlignTrailingComments: true
18+
SpacesBeforeTrailingComments: 2
19+
NamespaceIndentation: Inner
20+
MaxEmptyLinesToKeep: 1
21+
BreakBeforeBraces: Custom
22+
BraceWrapping:
23+
AfterCaseLabel: false
24+
AfterClass: true
25+
AfterControlStatement: false
26+
AfterEnum: true
27+
AfterFunction: true
28+
AfterNamespace: true
29+
AfterStruct: true
30+
AfterUnion: true
31+
AfterExternBlock: true
32+
BeforeCatch: false
33+
BeforeElse: false
34+
BeforeLambdaBody: false
35+
BeforeWhile: false
36+
IndentBraces: false
37+
SplitEmptyFunction: false
38+
SplitEmptyRecord: false
39+
SplitEmptyNamespace: true
40+
ColumnLimit: 88
41+
ForEachMacros: ['Q_FOREACH', 'foreach']

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build Diagnose Basic
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
env:
10+
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
11+
12+
jobs:
13+
build:
14+
runs-on: windows-2022
15+
steps:
16+
- name: Build Diagnose Basic
17+
id: build-diagnose-basic
18+
uses: ModOrganizer2/build-with-mob-action@master
19+
with:
20+
mo2-dependencies: uibase

.github/workflows/linting.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lint Diagnose Basic
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Check format
14+
uses: ModOrganizer2/check-formatting-action@master
15+
with:
16+
check-path: "."

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-merge-conflict
88
- id: check-case-conflict
9-
# - repo: https://github.com/pre-commit/mirrors-clang-format
10-
# rev: v19.1.5
11-
# hooks:
12-
# - id: clang-format
13-
# 'types_or': [c++, c]
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: v19.1.5
11+
hooks:
12+
- id: clang-format
13+
'types_or': [c++, c]
1414

1515
ci:
1616
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."

0 commit comments

Comments
 (0)