C#: Enable nullability on Semmle.Extraction.CIL.Driver#4114
C#: Enable nullability on Semmle.Extraction.CIL.Driver#4114tamasvajk merged 2 commits intogithub:mainfrom
Conversation
hvitved
left a comment
There was a problem hiding this comment.
Nice refactoring of ExtractorOptions!
|
|
||
| int IEqualityComparer<AssemblyName>.GetHashCode(AssemblyName obj) => | ||
| obj.Name.GetHashCode() + 7 * obj.Version.GetHashCode(); | ||
| (obj.Name, obj.Version).GetHashCode(); |
There was a problem hiding this comment.
Nice, hadn't thought of that way to combine hash codes.
There was a problem hiding this comment.
There's another new way of computing hashcodes: HashCode.Combine(). I'm not sure which is the preferred way.
There was a problem hiding this comment.
Perhaps the latter does not create the intermediate tuple object.
| // a deliberately malformed assembly. | ||
| // In this case, we just skip the extraction of this assembly. | ||
| isAssembly = false; | ||
| throw new InvalidAssemblyException(); |
There was a problem hiding this comment.
Perhaps document the method and mention that it may throw an InvalidAssemblyException.
| options.Threads = System.Environment.ProcessorCount; | ||
| options.PDB = true; | ||
| options.TrapCompression = TrapWriter.CompressionMode.Gzip; | ||
| var options = new ExtractorOptions(args); |
There was a problem hiding this comment.
No need to introduce options.
There was a problem hiding this comment.
Shall I remove the whole ParseCommandLine method and replace the callers with the a constructor call? We don't really need a factory method, do we?
No description provided.