summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format24
-rw-r--r--Tests/FindJPEG/Test/main.c3
-rw-r--r--Tests/FindX11/Test/main.c5
-rw-r--r--Tests/MFC/mfc1/ChildFrm.cpp2
-rw-r--r--Tests/MFC/mfc1/MainFrm.cpp2
-rw-r--r--Tests/MFC/mfc1/mfc1.cpp2
-rw-r--r--Tests/MFC/mfc1/mfc1Doc.cpp2
-rw-r--r--Tests/MFC/mfc1/mfc1View.cpp2
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp2
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.h2
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp2
11 files changed, 44 insertions, 4 deletions
diff --git a/.clang-format b/.clang-format
index 162c56d763..0c7d6b0720 100644
--- a/.clang-format
+++ b/.clang-format
@@ -18,4 +18,28 @@ ColumnLimit: 79
IndentPPDirectives: AfterHash
SortUsingDeclarations: false
SpaceAfterTemplateKeyword: true
+IncludeBlocks: Regroup
+IncludeCategories:
+ - Regex: '^[<"]cmConfigure\.h'
+ Priority: -1
+ - Regex: '^(<|")cm/'
+ Priority: 2
+ - Regex: '^(<|")windows\.h'
+ Priority: 3
+ - Regex: '^<sys/'
+ Priority: 5
+ - Regex: '^(<|")Qt?[A-Z]'
+ Priority: 6
+ - Regex: '^(<|")cmsys/'
+ Priority: 7
+ - Regex: '^(<|")cm_'
+ Priority: 8
+ - Regex: '^(<|")cm[A-Z][^.]+\.h'
+ Priority: 9
+ - Regex: '^<[^.]+\.h'
+ Priority: 4
+ - Regex: '^<'
+ Priority: 1
+ - Regex: '.*'
+ Priority: 10
...
diff --git a/Tests/FindJPEG/Test/main.c b/Tests/FindJPEG/Test/main.c
index 0e23eff5fb..5a67faaee8 100644
--- a/Tests/FindJPEG/Test/main.c
+++ b/Tests/FindJPEG/Test/main.c
@@ -1,7 +1,8 @@
#include <assert.h>
+// clang-format off
#include <stdio.h>
-
#include <jpeglib.h>
+// clang-format on
int main()
{
diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c
index 044bfa278e..c8144e09cd 100644
--- a/Tests/FindX11/Test/main.c
+++ b/Tests/FindX11/Test/main.c
@@ -167,12 +167,12 @@ static Bool test_Xkb(void)
#endif
#ifdef HAVE_X11_xkbfile
+// clang-format off
# include <stdio.h>
-
# include <X11/XKBlib.h>
# include <X11/extensions/XKBfile.h>
-
# include <stdlib.h>
+// clang-format on
static void test_xkbfile(void)
{
@@ -184,7 +184,6 @@ static void test_xkbfile(void)
#ifdef HAVE_X11_Xmu
# include <X11/Xmu/Xmu.h>
-
# include <stdlib.h>
static Bool test_Xmu(void)
diff --git a/Tests/MFC/mfc1/ChildFrm.cpp b/Tests/MFC/mfc1/ChildFrm.cpp
index a415229d78..0422d2a9cd 100644
--- a/Tests/MFC/mfc1/ChildFrm.cpp
+++ b/Tests/MFC/mfc1/ChildFrm.cpp
@@ -1,11 +1,13 @@
// ChildFrm.cpp : implementation of the CChildFrame class
//
+// clang-format off
#include "stdafx.h"
#include "mfc1.h"
#include "ChildFrm.h"
+// clang-format on
#ifdef _DEBUG
# define new DEBUG_NEW
diff --git a/Tests/MFC/mfc1/MainFrm.cpp b/Tests/MFC/mfc1/MainFrm.cpp
index 6bd2b3d9ae..7f82e267f5 100644
--- a/Tests/MFC/mfc1/MainFrm.cpp
+++ b/Tests/MFC/mfc1/MainFrm.cpp
@@ -1,11 +1,13 @@
// MainFrm.cpp : implementation of the CMainFrame class
//
+// clang-format off
#include "stdafx.h"
#include "mfc1.h"
#include "MainFrm.h"
+// clang-format on
#ifdef _DEBUG
# define new DEBUG_NEW
diff --git a/Tests/MFC/mfc1/mfc1.cpp b/Tests/MFC/mfc1/mfc1.cpp
index 892a89d272..87406b6416 100644
--- a/Tests/MFC/mfc1/mfc1.cpp
+++ b/Tests/MFC/mfc1/mfc1.cpp
@@ -1,6 +1,7 @@
// mfc1.cpp : Defines the class behaviors for the application.
//
+// clang-format off
#include "stdafx.h"
#include "MainFrm.h"
@@ -9,6 +10,7 @@
#include "ChildFrm.h"
#include "mfc1Doc.h"
#include "mfc1View.h"
+// clang-format on
#ifdef _DEBUG
# define new DEBUG_NEW
diff --git a/Tests/MFC/mfc1/mfc1Doc.cpp b/Tests/MFC/mfc1/mfc1Doc.cpp
index e69b61c713..ef8b6afd2a 100644
--- a/Tests/MFC/mfc1/mfc1Doc.cpp
+++ b/Tests/MFC/mfc1/mfc1Doc.cpp
@@ -1,11 +1,13 @@
// mfc1Doc.cpp : implementation of the Cmfc1Doc class
//
+// clang-format off
#include "stdafx.h"
#include "mfc1.h"
#include "mfc1Doc.h"
+// clang-format on
#ifdef _DEBUG
# define new DEBUG_NEW
diff --git a/Tests/MFC/mfc1/mfc1View.cpp b/Tests/MFC/mfc1/mfc1View.cpp
index 3de55cf6ea..55dcb8e425 100644
--- a/Tests/MFC/mfc1/mfc1View.cpp
+++ b/Tests/MFC/mfc1/mfc1View.cpp
@@ -1,12 +1,14 @@
// mfc1View.cpp : implementation of the Cmfc1View class
//
+// clang-format off
#include "stdafx.h"
#include "mfc1.h"
#include "mfc1Doc.h"
#include "mfc1View.h"
+// clang-format on
#ifdef _DEBUG
# define new DEBUG_NEW
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp b/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
index 3ba35fa436..595f55392b 100644
--- a/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
+++ b/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
@@ -1,6 +1,8 @@
+// clang-format off
#include "pch.h"
#include "CubeRenderer.h"
+// clang-format on
using namespace DirectX;
using namespace Microsoft::WRL;
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.h b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.h
index c3499c708e..79b9070069 100644
--- a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.h
+++ b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DApp1.h
@@ -1,8 +1,10 @@
#pragma once
+// clang-format off
#include "pch.h"
#include "CubeRenderer.h"
+// clang-format on
ref class Direct3DApp1 sealed
: public Windows::ApplicationModel::Core::IFrameworkView
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
index 0662fbe64a..f24ce28f11 100644
--- a/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
+++ b/Tests/VSWinStorePhone/Direct3DApp1/Direct3DBase.cpp
@@ -1,6 +1,8 @@
+// clang-format off
#include "pch.h"
#include "Direct3DBase.h"
+// clang-format on
using namespace DirectX;
using namespace Microsoft::WRL;