WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
15 stars 3 forks source link

FileSystemPaths analyzer (WTG2008) throws NullReferenceException #196

Closed andrewhongnsw closed 1 year ago

andrewhongnsw commented 1 year ago

In some circumstances the FileSystemPaths analyzer (WTG2008) throws a NullReferenceException inside the HasPathCombineMulti(). Will send details via another means.

yaakov-h commented 1 year ago
System.NullReferenceException: Object reference not set to an instance of an object.
   at WTG.Analyzers.FileSystemPathsAnalyzer.HasPathCombineMulti(Compilation compilation)
   at WTG.Analyzers.FileSystemPathsAnalyzer.CompilationStart(CompilationStartAnalysisContext context)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action`1 analyze, TArg argument, Nullable`1 info)
yaakov-h commented 1 year ago

This may have been already fixed in 120ebc5.

andrewhongnsw commented 1 year ago

Fixed by upgrading to package version 3.7.1 (newest) - we were previously consuming package version 2.10.6.