Skip to content

Commit f2dc555

Browse files
committed
init
Signed-off-by: YdrMaster <ydrml@hotmail.com>
0 parents  commit f2dc555

File tree

5 files changed

+119
-0
lines changed

5 files changed

+119
-0
lines changed

.clang-format

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Generated from CLion C/C++ Code Style settings
2+
BasedOnStyle: LLVM
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: Align
5+
# AlignConsecutiveAssignments: None
6+
AlignOperands: Align
7+
AllowAllArgumentsOnNextLine: false
8+
AllowAllConstructorInitializersOnNextLine: false
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: Always
11+
AllowShortCaseLabelsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: All
13+
AllowShortIfStatementsOnASingleLine: Always
14+
AllowShortLambdasOnASingleLine: All
15+
AllowShortLoopsOnASingleLine: true
16+
AlwaysBreakAfterReturnType: None
17+
AlwaysBreakTemplateDeclarations: No
18+
BreakBeforeBraces: Custom
19+
BraceWrapping:
20+
AfterCaseLabel: false
21+
AfterClass: false
22+
AfterControlStatement: Never
23+
AfterEnum: false
24+
AfterFunction: false
25+
AfterNamespace: false
26+
AfterUnion: false
27+
BeforeCatch: false
28+
BeforeElse: false
29+
IndentBraces: false
30+
SplitEmptyFunction: false
31+
SplitEmptyRecord: true
32+
BreakBeforeBinaryOperators: None
33+
BreakBeforeTernaryOperators: true
34+
BreakConstructorInitializers: BeforeColon
35+
BreakInheritanceList: BeforeColon
36+
ColumnLimit: 0
37+
CompactNamespaces: true
38+
ContinuationIndentWidth: 4
39+
IndentCaseLabels: true
40+
IndentPPDirectives: None
41+
IndentWidth: 4
42+
KeepEmptyLinesAtTheStartOfBlocks: true
43+
MaxEmptyLinesToKeep: 2
44+
NamespaceIndentation: All
45+
ObjCSpaceAfterProperty: false
46+
ObjCSpaceBeforeProtocolList: true
47+
PointerAlignment: Right
48+
ReflowComments: false
49+
SpaceAfterCStyleCast: true
50+
SpaceAfterLogicalNot: false
51+
SpaceAfterTemplateKeyword: false
52+
SpaceBeforeAssignmentOperators: true
53+
SpaceBeforeCpp11BracedList: false
54+
SpaceBeforeCtorInitializerColon: true
55+
SpaceBeforeInheritanceColon: true
56+
SpaceBeforeParens: ControlStatements
57+
SpaceBeforeRangeBasedForLoopColon: true
58+
SpaceInEmptyParentheses: false
59+
SpacesBeforeTrailingComments: 0
60+
SpacesInAngles: false
61+
SpacesInCStyleCastParentheses: false
62+
SpacesInContainerLiterals: false
63+
SpacesInParentheses: false
64+
SpacesInSquareBrackets: false
65+
TabWidth: 4
66+
UseTab: Never

.github/workflows/build.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# rust-clippy is a tool that runs a bunch of lints to catch common
6+
# mistakes in your Rust code and help improve your Rust code.
7+
# More details at https://github.com/rust-lang/rust-clippy
8+
# and https://rust-lang.github.io/rust-clippy/
9+
10+
name: CI
11+
12+
on:
13+
pull_request:
14+
push:
15+
paths-ignore:
16+
- '**.md'
17+
- 'LICENSE'
18+
19+
jobs:
20+
rust-clippy-analyze:
21+
name: Run xmake build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Install xmake
28+
uses: xmake-io/github-action-setup-xmake@v1
29+
with:
30+
xmake-version: latest
31+
32+
- name: xmake config
33+
run: xmake f
34+
35+
- name: xmake build
36+
run: xmake
37+
38+
- name: xmake run
39+
run: xmake run 00_hello_world

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build
2+
/.*/
3+
!/.github/

exercises/00_hello_world/main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <iostream>
2+
3+
int main(int argc, char **argv) {
4+
std::cout << "Hello world!" << std::endl;
5+
return 0;
6+
}

xmake.lua

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
add_rules("mode.debug", "mode.release")
2+
3+
target("00_hello_world")
4+
set_kind("binary")
5+
add_files("exercises/00_hello_world/main.cpp")

0 commit comments

Comments
 (0)