skip unparsable issues #26
1 changed files with 13 additions and 2 deletions
|
|
@ -56,8 +56,19 @@ impl Issues {
|
||||||
for direntry in dir.read_dir()? {
|
for direntry in dir.read_dir()? {
|
||||||
if let Ok(direntry) = direntry {
|
if let Ok(direntry) = direntry {
|
||||||
if direntry.metadata()?.is_dir() {
|
if direntry.metadata()?.is_dir() {
|
||||||
let issue = crate::issue::Issue::new_from_dir(direntry.path().as_path())?;
|
match crate::issue::Issue::new_from_dir(direntry.path().as_path()) {
|
||||||
issues.add_issue(issue);
|
Err(e) => {
|
||||||
|
println!(
|
||||||
|
"failed to parse issue {}, skipping",
|
||||||
|
direntry.file_name().to_string_lossy()
|
||||||
|
);
|
||||||
|
println!("ignoring error: {:?}", e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Ok(issue) => {
|
||||||
|
issues.add_issue(issue);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if direntry.file_name() == "config.toml" {
|
} else if direntry.file_name() == "config.toml" {
|
||||||
issues.parse_config(direntry.path().as_path())?;
|
issues.parse_config(direntry.path().as_path())?;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue