From 1f4ac42b2b3117dbba46272e5bb6daa6fbdfca25 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 10 Mar 2026 12:22:53 -0400 Subject: [PATCH 1/5] add check error --- src/cmd/check.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/check.rs b/src/cmd/check.rs index f6dd657..06db079 100644 --- a/src/cmd/check.rs +++ b/src/cmd/check.rs @@ -24,6 +24,7 @@ pub enum OsedaCheckError { BadGitCredentials(String), DirectoryNameMismatch(String), CouldNotPingLocalPresentation(String), + MissingDescription(String) } impl std::error::Error for OsedaCheckError {} @@ -41,6 +42,9 @@ impl std::fmt::Display for OsedaCheckError { Self::CouldNotPingLocalPresentation(msg) => { write!(f, "Could not ping localhost after project was ran {}", msg) } + Self::MissingDescription(msg) => { + write!(f, "Config file is missing description {}", msg) + } } } } From 60fa267938084b5f9f2ae50ac5487d8aa7924fce Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 10 Mar 2026 12:23:00 -0400 Subject: [PATCH 2/5] check for empty or missing --- src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config.rs b/src/config.rs index 1c79160..2d42bec 100644 --- a/src/config.rs +++ b/src/config.rs @@ -95,6 +95,13 @@ pub fn validate_config( )); } + if conf.description.is_empty() { + return Err(OsedaCheckError::MissingDescription( + "Description is missing or empty. Please update the oseda-config.json".to_owned(), + )) + } + + Ok(()) } From 57b3a9df853b495c5ba6d7eb2e77ff86a1fd48ab Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 10 Mar 2026 13:03:33 -0400 Subject: [PATCH 3/5] fix empty description test --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 2d42bec..ba1e1d8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -288,7 +288,7 @@ mod test { tags: vec![Tag::ComputerScience], last_updated: chrono::Utc::now(), color: Color::Black.into_hex(), - description: String::new(), + description: String::from("Test Description"), }; let fake_dir = Path::new("/tmp/my-project"); @@ -306,7 +306,7 @@ mod test { tags: vec![Tag::ComputerScience], last_updated: chrono::Utc::now(), color: Color::Black.into_hex(), - description: String::new(), + description: String::from("Test Description"), }; let fake_dir = Path::new("/tmp/oseda"); From 598b2cef7fbbe54d2a2ad51d62c8d34bd4969fa0 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 10 Mar 2026 13:04:01 -0400 Subject: [PATCH 4/5] fix skip git test --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index ba1e1d8..12c1f35 100644 --- a/src/config.rs +++ b/src/config.rs @@ -344,7 +344,7 @@ mod test { tags: vec![Tag::ComputerScience], last_updated: chrono::Utc::now(), color: Color::Black.into_hex(), - description: String::new(), + description: String::from("Test Description"), }; let fake_dir = Path::new("/tmp/oseda"); From 59ef31d827f01d6d22198dde9c3b3a5c2dbc1946 Mon Sep 17 00:00:00 2001 From: ReeseHatfield Date: Tue, 10 Mar 2026 13:31:13 -0400 Subject: [PATCH 5/5] document description Co-authored-by: 22lavonne <22lavonne@gmail.com> --- src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.rs b/src/config.rs index 12c1f35..81416f5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -114,6 +114,7 @@ pub struct OsedaConfig { // effectively mutable. Will get updated on each deployment pub last_updated: DateTime, pub color: String, + // description must not be empty for check/deploy pub description: String }