paulirwin opened a new issue, #1098:
URL: https://github.com/apache/lucenenet/issues/1098

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Task description
   
   StackTraceHelper is a public type, so we should make these Roslyn analyzer 
rules part of our public analyzers. Alternatively, if we feel like this type 
should not be public, we can move these to our dev analyzers instead. This type 
does not exist in Lucene.
   
   - For `StackTraceHelper.DoesStackTraceContainMethod(string className, string 
methodName)`, warn if the className argument does not use the `nameof` 
operator, and likewise for methodName. There are some legitimate uses of this 
that can be suppressed, but it should be done deliberately.
   - Similar to the one above, error if the className and methodName are 
constant expressions (like nameof) and the method does not exist on the type. 
This will help prevent accidentally referencing a method that would result in 
the call always being false.
   - Warn if methods referenced by these calls (via constant expressions like 
nameof) are not marked `[MethodImpl(MethodImplOptions.NoInlining)]` (overlaps 
with #1097)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to