Skip to content

Commit

Permalink
clang-format: add rule for pch.h and generated files (#2767)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlenecota authored and msftbot[bot] committed Jul 15, 2019
1 parent 67d7313 commit ba92a18
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h(pp)?>'
- Regex: 'pch.h'
Priority: -1
- Regex: '.*\.g\..*'
Priority: 1
- Regex: '^<.*'
- Regex: '^<.*\.h(pp)?>'
Priority: 2
- Regex: '.*'
- Regex: '^<.*'
Priority: 3
- Regex: '.*'
Priority: 4
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
Expand Down
2 changes: 1 addition & 1 deletion vnext/Universal.UnitTests/App.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Implementation of the App class.
//

#include "MainPage.xaml.h"
#include "pch.h"
#include "MainPage.xaml.h"

using namespace ReactUWPUnitTests;

Expand Down
2 changes: 1 addition & 1 deletion vnext/Universal.UnitTests/MainPage.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Implementation of the MainPage class.
//

#include "MainPage.xaml.h"
#include "pch.h"
#include "MainPage.xaml.h"

using namespace ReactUWPUnitTests;
using namespace Platform;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "pch.h"
#include <../Chakra/Utf8DebugExtensions.h>
#include <CppUnitTest.h>
#include <string>
#include <vector>
#include "pch.h"

using namespace facebook::react;
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
Expand Down

0 comments on commit ba92a18

Please sign in to comment.