SLVS-1481 Show message when code does not match#5727
SLVS-1481 Show message when code does not match#5727gabriela-trutan-sonarsource merged 21 commits intofeature/fix-suggestionfrom
Conversation
…at does not exist
…tch the code from the source file
…nd in the snapshot
…log. This has multiple advantages including better testability of code and the fact that the callers don't have to add references to all the services required to show the ManageBinding dialog,
…nnection to the server is shown.
| var textView = GetFileContent(parameters, absoluteFilePath); | ||
| if (!ValidateFileExists(textView, absoluteFilePath)) |
There was a problem hiding this comment.
Minor:
The GetFileContent and the ValidateFileExists should most of the times be called together. They could be combined in a single method, as we also do for the ValidateConfiguration.
Something like: ValidateFileExists(absoluteFilePath, out var textView)
There was a problem hiding this comment.
I disagree. Getting the file content and validating if it exists should be separate, otherwise it violates the SRP (single responsibility principle).
The same with ValidateFileExists(absoluteFilePath, out var textView). The out parameter is already an indicator that the method does more than it should: validating and returning something.
I will leave them separate for now.
|



SLVS-1481