[clang-format] Increase PenaltyReturnTypeOnItsOwnLine

This commit is contained in:
Alexander Karatarakis 2017-04-28 12:38:13 -07:00
parent 5d3f6a79b4
commit 8a1e0b144c
9 changed files with 42 additions and 21 deletions

View File

@ -27,5 +27,5 @@ Cpp11BracedListStyle: false
IndentCaseLabels: true
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: All
PenaltyReturnTypeOnItsOwnLine: 100
PenaltyReturnTypeOnItsOwnLine: 1000
SpaceAfterTemplateKeyword: false

View File

@ -22,6 +22,6 @@ namespace vcpkg::Paragraphs
std::vector<SourceParagraph> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir);
std::map<std::string, VersionT>
extract_port_names_and_versions(const std::vector<SourceParagraph>& source_paragraphs);
std::map<std::string, VersionT> extract_port_names_and_versions(
const std::vector<SourceParagraph>& source_paragraphs);
}

View File

@ -20,8 +20,8 @@ namespace vcpkg
std::string command;
std::vector<std::string> command_arguments;
std::unordered_set<std::string>
check_and_get_optional_command_arguments(const std::vector<std::string>& valid_options) const;
std::unordered_set<std::string> check_and_get_optional_command_arguments(
const std::vector<std::string>& valid_options) const;
void check_max_arg_count(const size_t expected_arg_count) const;
void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const;

View File

@ -240,8 +240,8 @@ namespace vcpkg::Paragraphs
return output;
}
std::map<std::string, VersionT>
extract_port_names_and_versions(const std::vector<SourceParagraph>& source_paragraphs)
std::map<std::string, VersionT> extract_port_names_and_versions(
const std::vector<SourceParagraph>& source_paragraphs)
{
std::map<std::string, VersionT> names_and_versions;
for (const SourceParagraph& port : source_paragraphs)

View File

@ -495,11 +495,11 @@ namespace vcpkg::PostBuildLint
return LintStatus::ERROR_DETECTED;
}
static LintStatus
check_lib_files_are_available_if_dlls_are_available(const std::map<BuildPolicies, OptBool>& policies,
const size_t lib_count,
const size_t dll_count,
const fs::path& lib_dir)
static LintStatus check_lib_files_are_available_if_dlls_are_available(
const std::map<BuildPolicies, OptBool>& policies,
const size_t lib_count,
const size_t dll_count,
const fs::path& lib_dir)
{
auto it = policies.find(BuildPoliciesC::DLLS_WITHOUT_LIBS);
if (it != policies.cend() && it->second == OptBoolC::ENABLED)

View File

@ -135,8 +135,8 @@ namespace vcpkg
return args;
}
std::unordered_set<std::string>
VcpkgCmdArguments::check_and_get_optional_command_arguments(const std::vector<std::string>& valid_options) const
std::unordered_set<std::string> VcpkgCmdArguments::check_and_get_optional_command_arguments(
const std::vector<std::string>& valid_options) const
{
std::unordered_set<std::string> output;
auto options_copy = this->optional_command_arguments;

View File

@ -42,10 +42,10 @@ namespace vcpkg::Commands::PortsDiff
std::vector<T> only_right;
};
static std::vector<UpdatedPort>
find_updated_ports(const std::vector<std::string>& ports,
const std::map<std::string, VersionT>& previous_names_and_versions,
const std::map<std::string, VersionT>& current_names_and_versions)
static std::vector<UpdatedPort> find_updated_ports(
const std::vector<std::string>& ports,
const std::map<std::string, VersionT>& previous_names_and_versions,
const std::map<std::string, VersionT>& current_names_and_versions)
{
std::vector<UpdatedPort> output;
for (const std::string& name : ports)

View File

@ -121,7 +121,26 @@ namespace vcpkg::Commands::Remove
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
static const std::string OPTION_PURGE = "--purge";
enum SwitchType
{
SINGLE,
SINGLE_WITH_NO,
VALUE,
};
struct Option
{
CStringView name;
SwitchType type;
};
static constexpr Option options_table[] = {
Option{ "--purge", SINGLE_WITH_NO }, Option{ "--recurse", SINGLE_WITH_NO },
Option{ "--dry-run", SINGLE_WITH_NO }, Option{ "--outdated", SINGLE },
Option{ "--logfile", VALUE },
};
static constexpr CStringView OPTION_PURGE = "--purge";
static const std::string OPTION_NO_PURGE = "--no-purge";
static const std::string OPTION_RECURSE = "--recurse";
static const std::string OPTION_DRY_RUN = "--dry-run";

View File

@ -148,8 +148,10 @@ namespace vcpkg::Files
{
fs::stdfs::copy(oldpath, newpath, opts);
}
virtual bool
copy_file(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) override
virtual bool copy_file(const fs::path& oldpath,
const fs::path& newpath,
fs::copy_options opts,
std::error_code& ec) override
{
return fs::stdfs::copy_file(oldpath, newpath, opts, ec);
}