-
Notifications
You must be signed in to change notification settings - Fork 590
Apply clang-format #6799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Apply clang-format #6799
Changes from 34 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
0bf14a1
draft
licanhua ec915c1
update readme
licanhua 5d71677
format project
licanhua 43798c6
update pipeline
licanhua 9d2c700
revert change on ios
licanhua d3ca076
revert change on PerfApp because it's C++/CX project and ^ is not wel…
licanhua 95c0185
update local vs version and make BasedOnStyle:Microsoft
licanhua 8d03136
disable pipeline check and revert change on formatted files
licanhua 8a21c5b
remove .h, .cpp from .editorconfig
licanhua ae9d843
Apply suggestions from code review
licanhua 8599a38
Update .clang-format
licanhua 211ea7e
enable hooks and recover clang-format
licanhua ece507a
rollback to cpp11
licanhua 700de21
format files
licanhua ee45fe9
Revert "format files"
licanhua 946ab61
Revert "format files"
licanhua be36875
add clang-format-launcher
licanhua 01d30f5
Merge branch 'clang-format' of https://github.com/microsoft/adaptivec…
licanhua 848a995
clang-format exception
licanhua 84575c1
update documents
licanhua 63276aa
add npm run format to error
licanhua bad13cb
update package-lock
licanhua 72d3def
add pipeline to check the format and create patch file if failed
licanhua 1a133c2
update echo message
licanhua 21248a9
Merge branch 'main' into clang-format
licanhua d25f9f7
move clang.format.json to package.json
licanhua c69536b
Merge branch 'main' into clang-format
beervoley 756e486
address comments
licanhua 4554100
Merge branch 'clang-format' of https://github.com/microsoft/adaptivec…
licanhua 7c09754
Merge branch 'main' into clang-format
licanhua c9ca001
Deleting outdated VsCode extension (#6831)
eba8150
provide crossplatform hooks
licanhua 15a3efb
Merge branch 'clang-format' of https://github.com/microsoft/adaptivec…
licanhua b3f3162
Merge branch 'main' into clang-format
licanhua 3c13d07
Update scripts/hooks/clangFormatFunc
licanhua 493f1b8
address comment
licanhua 576b2b5
limit error number
licanhua 1cc02c8
Merge branch 'main' into clang-format
licanhua 1b0e1d5
update clang-format-launcher version
licanhua c4c62f3
Update .clang-format
licanhua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| # this file work is a derivative of .clang-format which follows | ||
| # https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md | ||
| # | ||
| Language: Cpp | ||
| BasedOnStyle: Microsoft | ||
| AccessModifierOffset: -4 | ||
| AlignAfterOpenBracket: AlwaysBreak | ||
| AlignEscapedNewlines: DontAlign | ||
| AlwaysBreakBeforeMultilineStrings: true | ||
| AlwaysBreakTemplateDeclarations: Yes | ||
| BinPackArguments: false | ||
| BinPackParameters: false | ||
| BraceWrapping: | ||
| AfterCaseLabel: true | ||
| AfterUnion: true | ||
| AfterExternBlock: false | ||
| BreakConstructorInitializers: AfterColon | ||
| CompactNamespaces: true | ||
| ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
| IncludeBlocks: Regroup | ||
| IncludeCategories: | ||
| - Regex: '^"(stdafx.h|pch.h|precomp.h)"$' | ||
| Priority: -1 | ||
| NamespaceIndentation: Inner | ||
| PenaltyExcessCharacter: 1 | ||
| PointerAlignment: Left | ||
| SortIncludes: false | ||
| Standard: Cpp11 | ||
| UseTab: Never | ||
licanhua marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: $(Year:yy).$(Month).$(DayOfMonth).$(rev:r) | ||
|
|
||
| pr: | ||
| branches: | ||
| include: | ||
| - main | ||
|
|
||
| pool: | ||
| vmImage: ubuntu-latest | ||
licanhua marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| steps: | ||
| - task: NodeTool@0 | ||
| inputs: | ||
| versionSpec: '14.x' | ||
| displayName: 'Install Node.js' | ||
|
|
||
| - script: | | ||
licanhua marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| npm install | ||
| displayName: 'npm install' | ||
| workingDirectory: source/nodejs | ||
|
|
||
| - script: | | ||
| npm run verify --verbose | ||
| displayName: 'npm run verify --verbose' | ||
| workingDirectory: source/nodejs | ||
|
|
||
| - bash: | | ||
| echo "##[command]Three ways to fix the format problem" | ||
| echo '##[command]1. powershell -ExecutionPolicy Bypass scripts\FormatSource.ps1 -ModifiedOnly $False' | ||
| echo "##[command]2. or cd source\nodejs, then npm run format --verbse" | ||
| echo "##[command]3. or download format.patch from pippeline, then git apply format.patch" | ||
| displayName: 'How to fix the format problem' | ||
| condition: failed() | ||
|
|
||
| - script: | | ||
licanhua marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| npm run format --verbose | ||
| displayName: 'npm run format --verbose' | ||
| workingDirectory: source/nodejs | ||
| condition: failed() | ||
|
|
||
| - script: | | ||
| git diff > format.patch | ||
| displayName: 'create format.patch' | ||
| condition: failed() | ||
|
|
||
| - task: CopyFiles@2 | ||
| inputs: | ||
| contents: 'format.patch' | ||
| targetFolder: $(Build.ArtifactStagingDirectory) | ||
| condition: failed() | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| inputs: | ||
| pathToPublish: $(Build.ArtifactStagingDirectory) | ||
| artifactName: drop | ||
| condition: failed() | ||
licanhua marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.