Skip to content

Commit

Permalink
[vcpkg formatting] Fix format regex (microsoft#12369)
Browse files Browse the repository at this point in the history
* [vcpkg formatting] correct the header regexes

* format
  • Loading branch information
strega-nil authored Jul 12, 2020
1 parent 4d2fe84 commit 64429fa
Show file tree
Hide file tree
Showing 129 changed files with 273 additions and 175 deletions.
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ IncludeCategories:
Priority: -1
- Regex: '^<catch2/catch\.hpp>$'
Priority: 1
- Regex: '^<vcpkg/base/*\.h>$'
- Regex: '^<vcpkg/base/.*\.h>$'
Priority: 2
- Regex: '^<vcpkg/*\.h>$'
- Regex: '^<vcpkg/.*\.h>$'
Priority: 3
- Regex: '^<[a-z0-9_]*\.h>$'
Priority: 4
Expand Down
5 changes: 3 additions & 2 deletions include/vcpkg-test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

#include <catch2/catch.hpp>

#include <memory>

#include <vcpkg/base/files.h>
#include <vcpkg/base/pragmas.h>

#include <vcpkg/statusparagraph.h>

#include <memory>

#define CHECK_EC(ec) \
do \
{ \
Expand Down
1 change: 1 addition & 0 deletions include/vcpkg/archives.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <vcpkg/base/files.h>

#include <vcpkg/vcpkgpaths.h>

namespace vcpkg::Archives
Expand Down
6 changes: 3 additions & 3 deletions include/vcpkg/base/chrono.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <chrono>
#include <string>

#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/optional.h>

#include <chrono>
#include <string>

namespace vcpkg::Chrono
{
class ElapsedTime
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/cofffilereader.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <vector>

#include <vcpkg/base/files.h>
#include <vcpkg/base/machinetype.h>

#include <vector>

namespace vcpkg::CoffFileReader
{
struct DllInfo
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/enums.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <string>

#include <vcpkg/base/lineinfo.h>

#include <string>

namespace vcpkg::Enums
{
std::string nullvalue_to_string(const CStringView enum_name);
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/expected.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <system_error>

#include <vcpkg/base/checks.h>
#include <vcpkg/base/stringliteral.h>

#include <system_error>

namespace vcpkg
{
template<class Err>
Expand Down
6 changes: 3 additions & 3 deletions include/vcpkg/base/graphs.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <vcpkg/base/checks.h>
#include <vcpkg/base/system.print.h>

#include <string>
#include <unordered_map>
#include <vector>

#include <vcpkg/base/checks.h>
#include <vcpkg/base/system.print.h>

namespace vcpkg::Graphs
{
enum class ExplorationStatus
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/hash.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <string>

#include <vcpkg/base/files.h>

#include <string>

namespace vcpkg::Hash
{
enum class Algorithm
Expand Down
10 changes: 5 additions & 5 deletions include/vcpkg/base/json.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#pragma once

#include <vcpkg/base/expected.h>
#include <vcpkg/base/files.h>
#include <vcpkg/base/parse.h>
#include <vcpkg/base/stringview.h>

#include <stddef.h>
#include <stdint.h>

Expand All @@ -8,11 +13,6 @@
#include <utility>
#include <vector>

#include <vcpkg/base/expected.h>
#include <vcpkg/base/files.h>
#include <vcpkg/base/parse.h>
#include <vcpkg/base/stringview.h>

namespace vcpkg::Json
{
struct JsonStyle
Expand Down
6 changes: 3 additions & 3 deletions include/vcpkg/base/optional.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <type_traits>
#include <utility>

#include <vcpkg/base/lineinfo.h>
#include <vcpkg/base/pragmas.h>

#include <type_traits>
#include <utility>

namespace vcpkg
{
struct NullOpt
Expand Down
7 changes: 4 additions & 3 deletions include/vcpkg/base/parse.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#pragma once

#include <memory>
#include <string>

#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/stringview.h>
#include <vcpkg/base/unicode.h>

#include <vcpkg/textrowcol.h>

#include <memory>
#include <string>

namespace vcpkg::Parse
{
struct IParseError
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/stringliteral.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <string>

#include <vcpkg/base/zstringview.h>

#include <string>

namespace vcpkg
{
struct StringLiteral : ZStringView
Expand Down
12 changes: 6 additions & 6 deletions include/vcpkg/base/strings.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#pragma once

#include <errno.h>
#include <inttypes.h>
#include <limits.h>

#include <vector>

#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/pragmas.h>
#include <vcpkg/base/stringliteral.h>
#include <vcpkg/base/stringview.h>
#include <vcpkg/base/view.h>

#include <errno.h>
#include <inttypes.h>
#include <limits.h>

#include <vector>

namespace vcpkg::Strings::details
{
template<class T>
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/stringview.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <vcpkg/base/optional.h>

#include <limits>
#include <string>
#include <vector>

#include <vcpkg/base/optional.h>

namespace vcpkg
{
struct StringView
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/system.debug.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <atomic>

#include <vcpkg/base/chrono.h>
#include <vcpkg/base/system.print.h>

#include <atomic>

namespace vcpkg::Debug
{
extern std::atomic<bool> g_debugging;
Expand Down
6 changes: 3 additions & 3 deletions include/vcpkg/base/system.process.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once

#include <vcpkg/base/files.h>
#include <vcpkg/base/zstringview.h>

#include <functional>
#include <string>
#include <unordered_map>
#include <vector>

#include <vcpkg/base/files.h>
#include <vcpkg/base/zstringview.h>

namespace vcpkg::System
{
struct CMakeVariable
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/zstringview.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <vcpkg/base/stringview.h>

#include <algorithm>
#include <cstddef>
#include <cstring>
#include <string>

#include <vcpkg/base/stringview.h>

namespace vcpkg
{
// A counted view of a null-terminated string
Expand Down
1 change: 1 addition & 0 deletions include/vcpkg/binarycaching.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <vcpkg/base/expected.h>
#include <vcpkg/base/files.h>

#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>

Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/binarycaching.private.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <string>

#include <vcpkg/dependencies.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>

#include <string>

namespace vcpkg
{
std::string reformat_version(const std::string& version, const std::string& abi_tag);
Expand Down
11 changes: 6 additions & 5 deletions include/vcpkg/build.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#pragma once

#include <array>
#include <map>
#include <set>
#include <vector>

#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/files.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/system.process.h>

#include <vcpkg/cmakevars.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/triplet.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkgpaths.h>

#include <array>
#include <map>
#include <set>
#include <vector>

namespace vcpkg
{
struct IBinaryProvider;
Expand Down
7 changes: 4 additions & 3 deletions include/vcpkg/buildenvironment.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include <string>
#include <vector>

#include <vcpkg/base/system.process.h>

#include <vcpkg/vcpkgpaths.h>

#include <string>
#include <vector>

namespace vcpkg
{
std::string make_cmake_cmd(const VcpkgPaths& paths,
Expand Down
1 change: 1 addition & 0 deletions include/vcpkg/cmakevars.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <vcpkg/base/optional.h>

#include <vcpkg/portfileprovider.h>
#include <vcpkg/vcpkgpaths.h>

Expand Down
8 changes: 4 additions & 4 deletions include/vcpkg/commands.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#pragma once

#include <array>
#include <map>
#include <vector>

#include <vcpkg/build.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkgpaths.h>

#include <array>
#include <map>
#include <vector>

namespace vcpkg::Commands
{
using CommandTypeA = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet);
Expand Down
9 changes: 5 additions & 4 deletions include/vcpkg/dependencies.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#pragma once

#include <functional>
#include <map>
#include <vector>

#include <vcpkg/base/optional.h>
#include <vcpkg/base/util.h>

#include <vcpkg/build.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/vcpkgpaths.h>

#include <functional>
#include <map>
#include <vector>

namespace vcpkg::Graphs
{
struct Randomizer;
Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/export.chocolatey.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <vector>

#include <vcpkg/dependencies.h>
#include <vcpkg/vcpkgpaths.h>

#include <vector>

namespace vcpkg::Export::Chocolatey
{
struct Options
Expand Down
Loading

0 comments on commit 64429fa

Please sign in to comment.