Skip to content

Commit

Permalink
Avoid clang format
Browse files Browse the repository at this point in the history
Delete unused variables

Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Oct 25, 2024
1 parent d16b54b commit 8b93027
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
37 changes: 27 additions & 10 deletions map/autoware_lanelet2_map_validator/src/lib/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,45 @@ MetaConfig parseCommandLine(int argc, const char * argv[])
po::options_description desc(
"Runs a set of validators on a map. Think of it like a linter. The following checks are "
"available");
desc.add_options()("help,h", "This help message")(
"map_file,m", po::value<std::string>(), "Path to the map to be validated")(

// clang-format off
desc.add_options()
(
"help,h", "This help message"
)(
"map_file,m", po::value<std::string>(), "Path to the map to be validated"
)(
"input_requirements,i", po::value<std::string>(),
"Path to the yaml file where the list of requirements and validators is written")(
"Path to the yaml file where the list of requirements and validators is written"
)(
"output_directory,o", po::value<std::string>(),
"Directory to save the list of validation results in a yaml format")(
"Directory to save the list of validation results in a yaml format"
)(
"validator,v", po::value(&validation_config.checksFilter),
"Comma separated list of regexes to filter the applicable validators. Will run all "
"validators by default. Example: routing_graph.* to run all checks for the routing graph")(
"validators by default. Example: routing_graph.* to run all checks for the routing graph"
)(
"projector,p", po::value(&config.projector_type)->composing(),
"Projector used for loading lanelet map. Available projectors are: mgrs, utm, "
"transverse_mercator. (default: mgrs)")(
"transverse_mercator. (default: mgrs)"
)(
"location,l", po::value(&validation_config.location)->default_value(validation_config.location),
"Location of the map (for instantiating the traffic rules), e.g. de for Germany")(
"Location of the map (for instantiating the traffic rules), e.g. de for Germany"
)(
"participants", po::value(&validation_config.participants)->composing(),
"Participants for which the routing graph will be instantiated (default: vehicle)")(
"Participants for which the routing graph will be instantiated (default: vehicle)"
)(
"lat", po::value(&validation_config.origin.lat)->default_value(validation_config.origin.lat),
"Latitude coordinate of map origin. This is required for the transverse mercator "
"and utm projector.")(
"and utm projector."
)(
"lon", po::value(&validation_config.origin.lon)->default_value(validation_config.origin.lon),
"Longitude coordinate of map origin. This is required for the transverse mercator "
"and utm projector.")("print", "Print all available checker without running them");
"and utm projector."
)(
"print", "Print all available checker without running them"
);
// clang-format on

po::variables_map vm;
po::positional_options_description pos;
Expand Down
17 changes: 0 additions & 17 deletions map/autoware_lanelet2_map_validator/src/lib/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,6 @@ std::vector<lanelet::validation::DetectedIssues> validateMap(const MetaConfig &
const auto & cm_config = config.command_line_config;
const auto & val_config = config.command_line_config.validationConfig;

const auto & parse_filter = [](const std::string & str) {
std::vector<std::regex> regexes;
std::stringstream ss(str);

while (ss.good()) {
std::string substr;
getline(ss, substr, ',');
if (substr.empty()) {
continue;
}
regexes.emplace_back(substr, std::regex::basic | std::regex::icase);
}
return regexes;
};

auto checks = parse_filter(val_config.checksFilter);

std::vector<lanelet::validation::DetectedIssues> issues;
lanelet::LaneletMapPtr map;
lanelet::validation::Strings errors;
Expand Down

0 comments on commit 8b93027

Please sign in to comment.