DetectIdentifier obtain complete variable name#323
Conversation
|
Thank you for the PR. I only proposed a change in the signature. |
- Change signature
|
@alesanchez-windifferent can you please explain what you were trying to accomplish with this PR? The implementation seems wrong, and led to #351. For example, with your implementation: var target = new Interpreter();
target.SetVariable("test", "Toto");
var detectedIdentifiers = target.DetectIdentifiers("test.Length", DetectorOptions.IncludeChildren);
Assert.That(detectedIdentifiers.UnknownIdentifiers, Is.Empty);Failure:
With |
|
@metoule I thought that with the PR the idea was to also check for any missing sub-properties or sub-functions. But I realize only now that the implementation is not correct. My mistake for not checking more carefully. Sorry. Can we ollback the code, leaving DetectorOptions for the future, and marking IncludeChildren option as obsolete? @alesanchez-windifferent If you explain your use case maybe we can find another solution. |
|
Having a full blown implementation which would check sub/properties and functions of all detected identifiers would be great. |
Add logic to enable detection of complete variable name (ex. contact.firstname)