Closed manumafe98 closed 3 months ago
I'm wondering whether this approach makes it a bit too complex. Can't we decide to recommend using either substring
or split
in the comment (so not to mention both methods but one of the two, whichever we prefer) and update the analyzer implementation to follow these rules:
Scenario | Analyzer output |
---|---|
Solution using substring |
N/A |
Solution using split |
N/A |
Solution using some other approach | Use substring method* |
* Or split
if we think that's better than using substring
I'm wondering whether this approach makes it a bit too complex. Can't we decide to recommend using either
substring
orsplit
in the comment (so not to mention both methods but one of the two, whichever we prefer) and update the analyzer implementation to follow these rules:Scenario Analyzer output Solution using
substring
N/A Solution usingsplit
N/A Solution using some other approach Usesubstring
method*
- Or
split
if we think that's better than usingsubstring
Sure, we can still use the same comment to recommend using substring
then when we detect that neither split or substring has been used
closes #150
I have a couple of doubts about this:
Related to the second point, I guess I could create a method to format the elements of the list in a string that looks the likes of:
"substring, split"
but if we take that decision, we should extract that logic from the analyzer? so then we can reuse it with another analyzers in the future? or we dont mind repetition in this case