Severity: Info
Description:
Several magic numbers appear as bare literals without named constants, making their purpose opaque:
| File |
Line |
Value |
Purpose |
LogTailer.cs |
105 |
500 |
Log batch flush threshold |
ConsoleViewModel.cs |
257 |
300 |
Keystroke debounce delay (ms) |
ServiceManager.cs |
600 |
500 |
SCM poll interval during uninstall (ms) |
MainViewModel.cs |
758 |
8 |
Max bulk-operation parallelism cap |
ResourceHelper.cs |
20 |
20 |
Resource staleness delta (minutes) |
ServiceManager.cs |
27–28 |
60/30 |
SCM stop/start poll timeouts (overlap with AppConfig defaults) |
Suggested fix:
Extract each to a named constant (e.g., private const int LogBatchSize = 500;), either in the containing class or in AppConfig for cross-cutting values. Add brief comments explaining the rationale for each threshold.
Severity: Info
Description:
Several magic numbers appear as bare literals without named constants, making their purpose opaque:
LogTailer.cs500ConsoleViewModel.cs300ServiceManager.cs500MainViewModel.cs8ResourceHelper.cs20ServiceManager.cs60/30Suggested fix:
Extract each to a named constant (e.g.,
private const int LogBatchSize = 500;), either in the containing class or inAppConfigfor cross-cutting values. Add brief comments explaining the rationale for each threshold.