As a result, the second check is always true if the first check is false, and vice versa. We can easily see that the args.NewMobState field is checked for inequality with two values: MobState.Dead and MobState.Critical via the OR operator. According to the warning, the expression is always true. Let's take a look at the conditional expression on line 49. Probably the '&' operator should be used here. You won't have to think long and hard because the following warning will clearly indicate the cause of the problem. This warning points to line 52 and indicates that the following code is unreachable. The PVS-Studio warning: V3142 Unreachable code detected. This window is usually located at one of the tabs in the VS Code bottom pane. You can run the analysis of the entire solution - just click the Analyze project button in the PVS-Studio window. Running the analysisįirst, open the folder with the solution. If they aren't, you can consult the installation instructions from the previous article about this extension. NET project analysis, I'll show you how easy it is to find errors with the PVS-Studio extension for VS Code! Preparing for the analysisīefore running the analysis, you need to check whether the PVS-Studio analyzer for your programming language and the PVS-Studio extension for VS Code are installed. In this article, using the example of the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |