Skip to content

Commit

Permalink
remove cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Oct 5, 2023
1 parent 2ba6192 commit 83da5f4
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 179 deletions.
30 changes: 24 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
---
# See all possible options and defaults with:
# clang-format --style=llvm --dump-config
BasedOnStyle: LLVM
# clang-format --style=Microsoft --dump-config
BasedOnStyle: Microsoft
Language: Cpp
# Standard: Cpp20
Standard: c++20
AccessModifierOffset: -4
AllowShortLambdasOnASingleLine: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakConstructorInitializers: BeforeColon
ColumnLimit: 99
ColumnLimit: 0
CommentPragmas: 'NOLINT:.*|^ IWYU pragma:'
IncludeBlocks: Regroup
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
# IndentWidth: 4
SpaceAfterCStyleCast: true
TabWidth: 4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortLambdasOnASingleLine: Inline
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBraces: Allman
DerivePointerAlignment: false
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
PointerAlignment: Left
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
3 changes: 1 addition & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Checks: |
misc-unused-parameters,
modernize-avoid-bind,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
Expand All @@ -34,7 +34,6 @@ Checks: |
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
Expand Down
73 changes: 0 additions & 73 deletions .cmake-format.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: clang-format Check
on:
pull_request:
push:
branches:
- clang-format
# - develop
jobs:
formatting-check:
name: Formatting Check
runs-on: windows-latest
strategy:
matrix:
path:
- check: 'src'
exclude: '(Dummy|Sample|Coroutine)'
# - check: 'docs'
# exclude: ''
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '13'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
fallback-style: 'Mozilla'
29 changes: 29 additions & 0 deletions .github/workflows/clang-tidy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: clang-tidy-review

# You can be more specific, but it currently only works on pull requests
on:
pull_request:
push:
branches:
- clang-format
# - develop

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

# Optionally generate compile_commands.json

- uses: ZedThree/clang-tidy-review@v0.12.0
id: review

# Uploads an artefact containing clang_fixes.json
- uses: ZedThree/clang-tidy-review/upload@v0.12.0
id: upload-review

# If there are any comments, fail the check
- if: steps.review.outputs.total_comments > 0
run: exit 1
98 changes: 0 additions & 98 deletions CMakeLists.txt

This file was deleted.

6 changes: 6 additions & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,26 @@
<LinkIncremental>false</LinkIncremental>
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\IntDir\</IntDir>
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
<ClangTidyChecks>-clang-diagnostic-pragma-once-outside-header</ClangTidyChecks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DevBuild|Win32'">
<GenerateManifest>false</GenerateManifest>
<IncludePath>$(SolutionDir)src\;$(SolutionDir)src\ExtraHeaders;$(SolutionDir)yrpp;$(SolutionDir)lib;$(VC_IncludePath)</IncludePath>
<LinkIncremental>false</LinkIncremental>
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\IntDir\</IntDir>
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
<ClangTidyChecks>-clang-diagnostic-pragma-once-outside-header</ClangTidyChecks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IncludePath>$(SolutionDir)src\;$(SolutionDir)src\ExtraHeaders;$(SolutionDir)yrpp;$(SolutionDir)lib;$(VC_IncludePath)</IncludePath>
<LinkIncremental>false</LinkIncremental>
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\IntDir\</IntDir>
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
<ClangTidyChecks>-clang-diagnostic-pragma-once-outside-header</ClangTidyChecks>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand Down

0 comments on commit 83da5f4

Please sign in to comment.