mirror of https://github.com/microsoft/vcpkg.git
[clang-format] Increase PenaltyReturnTypeOnItsOwnLine
This commit is contained in:
parent
5d3f6a79b4
commit
8a1e0b144c
|
|
@ -27,5 +27,5 @@ Cpp11BracedListStyle: false
|
|||
IndentCaseLabels: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
NamespaceIndentation: All
|
||||
PenaltyReturnTypeOnItsOwnLine: 100
|
||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
||||
SpaceAfterTemplateKeyword: false
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue