We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f46277 commit 1e38c70Copy full SHA for 1e38c70
autobuilder/src/main.rs
@@ -26,12 +26,12 @@ fn main() -> std::io::Result<()> {
26
27
for line in env::var("LGTM_INDEX_FILTERS")
28
.unwrap_or_default()
29
- .split("\n")
+ .split('\n')
30
{
31
- if line.starts_with("include:") {
32
- cmd.arg("--include").arg(&line[8..]);
33
- } else if line.starts_with("exclude:") {
34
- cmd.arg("--exclude").arg(&line[8..]);
+ if let Some(stripped) = line.strip_prefix("include:") {
+ cmd.arg("--include").arg(stripped);
+ } else if let Some(stripped) = line.strip_prefix("exclude:") {
+ cmd.arg("--exclude").arg(stripped);
35
}
36
37
let exit = &cmd.spawn()?.wait()?;
0 commit comments