Skip to content

Commit 441258a

Browse files
committed
添加 .gitattributes 和 .gitignore。
0 parents  commit 441258a

34 files changed

Lines changed: 2822 additions & 0 deletions

.clang-tidy

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Generated from CLion Inspection settings
2+
---
3+
Checks: '-*,
4+
bugprone-argument-comment,
5+
bugprone-assert-side-effect,
6+
bugprone-bad-signal-to-kill-thread,
7+
bugprone-branch-clone,
8+
bugprone-copy-constructor-init,
9+
bugprone-dangling-handle,
10+
bugprone-dynamic-static-initializers,
11+
bugprone-fold-init-type,
12+
bugprone-forward-declaration-namespace,
13+
bugprone-forwarding-reference-overload,
14+
bugprone-inaccurate-erase,
15+
bugprone-incorrect-roundings,
16+
bugprone-integer-division,
17+
bugprone-lambda-function-name,
18+
bugprone-macro-parentheses,
19+
bugprone-macro-repeated-side-effects,
20+
bugprone-misplaced-operator-in-strlen-in-alloc,
21+
bugprone-misplaced-pointer-arithmetic-in-alloc,
22+
bugprone-misplaced-widening-cast,
23+
bugprone-move-forwarding-reference,
24+
bugprone-multiple-statement-macro,
25+
bugprone-no-escape,
26+
bugprone-parent-virtual-call,
27+
bugprone-posix-return,
28+
bugprone-reserved-identifier,
29+
bugprone-sizeof-container,
30+
bugprone-sizeof-expression,
31+
bugprone-spuriously-wake-up-functions,
32+
bugprone-string-constructor,
33+
bugprone-string-integer-assignment,
34+
bugprone-string-literal-with-embedded-nul,
35+
bugprone-suspicious-enum-usage,
36+
bugprone-suspicious-include,
37+
bugprone-suspicious-memset-usage,
38+
bugprone-suspicious-missing-comma,
39+
bugprone-suspicious-semicolon,
40+
bugprone-suspicious-string-compare,
41+
bugprone-suspicious-memory-comparison,
42+
bugprone-suspicious-realloc-usage,
43+
bugprone-swapped-arguments,
44+
bugprone-terminating-continue,
45+
bugprone-throw-keyword-missing,
46+
bugprone-too-small-loop-variable,
47+
bugprone-undefined-memory-manipulation,
48+
bugprone-undelegated-constructor,
49+
bugprone-unhandled-self-assignment,
50+
bugprone-unused-raii,
51+
bugprone-unused-return-value,
52+
bugprone-use-after-move,
53+
bugprone-virtual-near-miss,
54+
cert-dcl21-cpp,
55+
cert-dcl58-cpp,
56+
cert-err34-c,
57+
cert-err52-cpp,
58+
cert-err60-cpp,
59+
cert-flp30-c,
60+
cert-msc50-cpp,
61+
cert-msc51-cpp,
62+
cert-str34-c,
63+
cppcoreguidelines-interfaces-global-init,
64+
cppcoreguidelines-narrowing-conversions,
65+
cppcoreguidelines-pro-type-member-init,
66+
cppcoreguidelines-pro-type-static-cast-downcast,
67+
cppcoreguidelines-slicing,
68+
google-default-arguments,
69+
google-explicit-constructor,
70+
google-runtime-operator,
71+
hicpp-exception-baseclass,
72+
hicpp-multiway-paths-covered,
73+
misc-misplaced-const,
74+
misc-new-delete-overloads,
75+
misc-no-recursion,
76+
misc-non-copyable-objects,
77+
misc-throw-by-value-catch-by-reference,
78+
misc-unconventional-assign-operator,
79+
misc-uniqueptr-reset-release,
80+
modernize-avoid-bind,
81+
modernize-concat-nested-namespaces,
82+
modernize-deprecated-headers,
83+
modernize-deprecated-ios-base-aliases,
84+
modernize-loop-convert,
85+
modernize-make-shared,
86+
modernize-make-unique,
87+
modernize-pass-by-value,
88+
modernize-raw-string-literal,
89+
modernize-redundant-void-arg,
90+
modernize-replace-auto-ptr,
91+
modernize-replace-disallow-copy-and-assign-macro,
92+
modernize-replace-random-shuffle,
93+
modernize-return-braced-init-list,
94+
modernize-shrink-to-fit,
95+
modernize-unary-static-assert,
96+
modernize-use-auto,
97+
modernize-use-bool-literals,
98+
modernize-use-emplace,
99+
modernize-use-equals-default,
100+
modernize-use-equals-delete,
101+
modernize-use-nodiscard,
102+
modernize-use-noexcept,
103+
modernize-use-nullptr,
104+
modernize-use-override,
105+
modernize-use-transparent-functors,
106+
modernize-use-uncaught-exceptions,
107+
mpi-buffer-deref,
108+
mpi-type-mismatch,
109+
openmp-use-default-none,
110+
performance-faster-string-find,
111+
performance-for-range-copy,
112+
performance-implicit-conversion-in-loop,
113+
performance-inefficient-algorithm,
114+
performance-inefficient-string-concatenation,
115+
performance-inefficient-vector-operation,
116+
performance-move-const-arg,
117+
performance-move-constructor-init,
118+
performance-no-automatic-move,
119+
performance-noexcept-move-constructor,
120+
performance-trivially-destructible,
121+
performance-type-promotion-in-math-fn,
122+
performance-unnecessary-copy-initialization,
123+
performance-unnecessary-value-param,
124+
portability-simd-intrinsics,
125+
readability-avoid-const-params-in-decls,
126+
readability-const-return-type,
127+
readability-container-size-empty,
128+
readability-convert-member-functions-to-static,
129+
readability-delete-null-pointer,
130+
readability-deleted-default,
131+
readability-inconsistent-declaration-parameter-name,
132+
readability-make-member-function-const,
133+
readability-misleading-indentation,
134+
readability-misplaced-array-index,
135+
readability-non-const-parameter,
136+
readability-redundant-control-flow,
137+
readability-redundant-declaration,
138+
readability-redundant-function-ptr-dereference,
139+
readability-redundant-smartptr-get,
140+
readability-redundant-string-cstr,
141+
readability-redundant-string-init,
142+
readability-simplify-subscript-expr,
143+
readability-static-accessed-through-instance,
144+
readability-static-definition-in-anonymous-namespace,
145+
readability-string-compare,
146+
readability-uniqueptr-delete-release,
147+
readability-use-anyofallof'

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Visual Studio 生成了具有 C++ 设置的 .editorconfig 文件。
2+
root = true
3+
4+
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
5+
6+
# Visual C++ 代码样式设置
7+
8+
# --- 通用设置 ---
9+
charset = utf-8
10+
end_of_line = crlf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
# --- 基础缩进 ---
15+
indent_style = space
16+
indent_size = 4
17+
tab_width = 4

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
2+
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
3+
name: CMake on a single platform
4+
5+
on:
6+
push:
7+
branches: [ "master" ]
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
env:
12+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
13+
BUILD_TYPE: Release
14+
15+
jobs:
16+
build:
17+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
18+
# You can convert this to a matrix build if you need cross-platform coverage.
19+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
20+
runs-on: windows-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Configure CMake
26+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
27+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
28+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
29+
30+
- name: Build
31+
# Build your program with the given configuration
32+
run: cmake --build ${{github.workspace}}/build --target time-devourer --config ${{env.BUILD_TYPE}}
33+
34+
- name: Test
35+
working-directory: ${{github.workspace}}/build
36+
# Execute tests defined by the CMake configuration.
37+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
38+
run: ctest -C ${{env.BUILD_TYPE}}
39+

0 commit comments

Comments
 (0)