You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an analyze command the "ConfigSourceToScan" and "ConfigRules" methods are called from the constructor. These methods may throw exceptions, and those exceptions are printed to the console with the stack trace. This level of detail isn't needed (perhaps the stack trace should show up on the debug level) but the Error level should be less verbose and a human readable error message. This ctor is called in many places (IDE is indicating over 50), so its a medium effort to refactor all those calls to handle the exception more gracefully.
Alternately consider a different calling pattern that obviates the need for throwing these exceptions in the first place.
For example, we currently throw an exception from the AnalyzeCommand if the source to scan contains no files. This seems like a worthwhile check, but likely doesn't need to be in the analyze command, and probably should just be part of the CLI experience not the lib.
The text was updated successfully, but these errors were encountered:
When creating an analyze command the "ConfigSourceToScan" and "ConfigRules" methods are called from the constructor. These methods may throw exceptions, and those exceptions are printed to the console with the stack trace. This level of detail isn't needed (perhaps the stack trace should show up on the debug level) but the Error level should be less verbose and a human readable error message. This ctor is called in many places (IDE is indicating over 50), so its a medium effort to refactor all those calls to handle the exception more gracefully.
Alternately consider a different calling pattern that obviates the need for throwing these exceptions in the first place.
For example, we currently throw an exception from the AnalyzeCommand if the source to scan contains no files. This seems like a worthwhile check, but likely doesn't need to be in the analyze command, and probably should just be part of the CLI experience not the lib.
The text was updated successfully, but these errors were encountered: