@@ -158,6 +158,12 @@ pub struct Config {
158158 #[ serde( default = "default_feedback_path" ) ]
159159 pub feedback_path : PathBuf ,
160160
161+ #[ serde( default = "default_eval_trend_path" ) ]
162+ pub eval_trend_path : PathBuf ,
163+
164+ #[ serde( default = "default_feedback_eval_trend_path" ) ]
165+ pub feedback_eval_trend_path : PathBuf ,
166+
161167 /// Path to the convention store file for learned review patterns.
162168 /// Defaults to ~/.local/share/diffscope/conventions.json if not set.
163169 #[ serde( default ) ]
@@ -496,6 +502,8 @@ impl Default for Config {
496502 symbol_index_lsp_command : None ,
497503 symbol_index_lsp_languages : default_symbol_index_lsp_languages ( ) ,
498504 feedback_path : default_feedback_path ( ) ,
505+ eval_trend_path : default_eval_trend_path ( ) ,
506+ feedback_eval_trend_path : default_feedback_eval_trend_path ( ) ,
499507 convention_store_path : None ,
500508 system_prompt : None ,
501509 api_key : None ,
@@ -813,6 +821,15 @@ impl Config {
813821 } else {
814822 self . symbol_index_provider = provider;
815823 }
824+ if self . feedback_path . as_os_str ( ) . is_empty ( ) {
825+ self . feedback_path = default_feedback_path ( ) ;
826+ }
827+ if self . eval_trend_path . as_os_str ( ) . is_empty ( ) {
828+ self . eval_trend_path = default_eval_trend_path ( ) ;
829+ }
830+ if self . feedback_eval_trend_path . as_os_str ( ) . is_empty ( ) {
831+ self . feedback_eval_trend_path = default_feedback_eval_trend_path ( ) ;
832+ }
816833
817834 if let Some ( command) = & self . symbol_index_lsp_command {
818835 if command. trim ( ) . is_empty ( ) {
@@ -1348,6 +1365,14 @@ fn default_feedback_path() -> PathBuf {
13481365 PathBuf :: from ( ".diffscope.feedback.json" )
13491366}
13501367
1368+ fn default_eval_trend_path ( ) -> PathBuf {
1369+ PathBuf :: from ( ".diffscope.eval-trend.json" )
1370+ }
1371+
1372+ fn default_feedback_eval_trend_path ( ) -> PathBuf {
1373+ PathBuf :: from ( ".diffscope.feedback-eval-trend.json" )
1374+ }
1375+
13511376fn default_pattern_repo_max_files ( ) -> usize {
13521377 8
13531378}
0 commit comments