-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Refactor extractor state classes and simplify extraction code #16732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
catch (Exception e) | ||
{ | ||
ExtractionContext.Logger.LogDebug($"Failed to compute absolute path for relative path in line mapping: '{mappedToPath}': {e}"); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
catch (Exception ex) // lgtm[cs/catch-of-all-exceptions] | ||
{ | ||
fileLogger.Log(Severity.Error, " Unhandled exception: {0}", ex); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
{ | ||
Extractor = extractor; | ||
ExtractionContext = extractor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This pull request primarily involves changes to the
Semmle.Extraction.CSharp
project to improve the handling of extraction context. The changes include using a newExtractionContext
object instead of the previousExtractor
object, adding new properties to theAnalyser
class, and updating method parameters and calls to use the new context. The changes aim to enhance the maintainability and readability of the codebase.