Add support global commands and several blocks scripts
This commit is contained in:
parent
321344a4c9
commit
9f22ea05a6
|
@ -32,15 +32,19 @@ std::unique_ptr<clippy::targets::RunShellScript> Config::GetTarget(
|
||||||
target_begin = true;
|
target_begin = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current.empty()) {
|
if (current.empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!std::isspace(current[0]) && target_begin) {
|
if (!std::isspace(current[0]) && target_begin) {
|
||||||
break;
|
target_begin = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target_begin) {
|
if (target_begin) {
|
||||||
target_commands.emplace_back(Strip(std::move(current)));
|
target_commands.emplace_back(Strip(std::move(current)));
|
||||||
|
} else if (current[0] == '!') {
|
||||||
|
target_commands.emplace_back(current.substr(1, current.size() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue