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

   ### Is there an existing issue for this?
   
   - [x] I have searched the existing issues
   
   ### Task description
   
   LuceneDev1001 correctly detects explicit calls to `float.ToString()` and 
`double.ToString()` and prompts to convert them to 
`J2N.Numerics.Single.ToString()` and `J2N.Numrics.Single.ToString()` 
respectively. However, it doesn't detect when floats and doubles are used 
inside of string concatenation or interpolation.
   
   ```c#
   // levelBottom and maxLevel are both float types
   Message("  level " + levelBottom + " to " + maxLevel + ": " + (1 + upto - 
start) + " segments");
   ```
   
   Once detected, there should be an analyzer to prompt for a code fix (similar 
to LuceneDev1001).
   
   ```c#
   Message("  level " + J2N.Numerics.Single.ToString(levelBottom) + " to " + 
J2N.Numerics.Single.ToString(maxLevel) + ": " + (1 + upto - start) + " 
segments");
   ```
   
   Interpolation should be handled similarly, but should be made into a 
separate analyzer id.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to