{"id":290490,"date":"2018-10-08T23:25:02","date_gmt":"2018-10-08T19:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290490"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290490","title":{"rendered":"Docotic.Pdf: \u041a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b PVS-Studio \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 \u0432 \u0437\u0440\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435?"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tt\/fj\/-u\/ttfj-uhwy2ogamewgz6zit48lni.png\" alt=\"Docotic.Pdf \u0438 PVS-studio\"><\/p>\n<p>  \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e. \u0418 \u043e PVS-Studio \u043c\u044b \u043d\u0430\u0441\u043b\u044b\u0448\u0430\u043d\u044b. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c Docotic.Pdf \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  <a href=\"https:\/\/bitmiracle.com\/pdf-library\/\">Docotic.Pdf<\/a> \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PDF \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C#, \u043d\u0435\u0442 unsafe \u043a\u043e\u0434\u0430, \u043d\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043a\u0440\u043e\u043c\u0435 .NET runtime. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043f\u043e\u0434 .NET 4+, \u0442\u0430\u043a \u0438 \u043f\u043e\u0434 .NET Standard 2+.<\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 10 \u043b\u0435\u0442 \u0438 \u0432 \u043d\u0435\u0439 110 \u0442\u044b\u0441\u044f\u0447 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e. \u0414\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Code Analysis \u0438 StyleCop. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u044b\u0441\u044f\u0447 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u043d\u0430\u0441 \u043e\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0439. \u041d\u0430\u0448\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d \u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0439 \u0434\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  \u041a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 PVS-Studio?<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0421\u043a\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0431\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u0441\u0430\u0439\u0442\u0430 PVS-Studio. \u041f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: analysis engines, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 PVS-Studio, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Visual Studio 2017.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c, \u0430 \u0432 \u043c\u0435\u043d\u044e \u041f\u0443\u0441\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u044f\u0440\u043b\u044b\u043a\u0430 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438: Standalone \u0438 PVS-Studio. \u041d\u0430 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b Standalone \u0438 \u0431\u044b\u043b \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u043b\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041c\u0430\u0441\u0448\u0442\u0430\u0431 200%, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u043e\u0435\u0439 Windows, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u0438\u0432\u043e. \u0427\u0430\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u043b\u043a\u0430\u044f, \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0415\u0434\u0438\u043d\u043e\u0440\u043e\u0433 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a Actions \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u044b \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u043e\u043a\u043d\u0430. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ll\/3k\/c5\/ll3kc5bovj5wkbvtldfz9zhzpzk.png\"><\/p>\n<p>  \u041d\u0443 \u0434\u0430 \u043b\u0430\u0434\u043d\u043e, \u0440\u0435\u0448\u0438\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e, \u0432 \u043c\u0435\u043d\u044e \u0424\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043c \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e-\u043a\u0430 \u044f \u043b\u0443\u0447\u0448\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b PVS-Studio \u2014 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u043a\u043d\u043e \u0441 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u041c\u0430\u0441\u0448\u0442\u0430\u0431 200% \u043e\u043f\u044f\u0442\u044c \u0434\u0430\u043b \u043e \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u0442\u044c. \u0422\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u043b: <s>\u0438\u0449\u0438\u0442\u0435 \u043c\u0435\u043d\u044f \u0432 \u00ab\u0422\u0440\u0435\u0445 \u041a\u043e\u0440\u043e\u043d\u0430\u0445\u00bb<\/s> \u0438\u0449\u0438\u0442\u0435 \u043c\u0435\u043d\u044e PVS-Studio \u0432 Visual Studio. \u0425\u043e\u0440\u043e\u0448\u043e, \u043e\u0442\u043a\u0440\u044b\u043b \u0421\u0442\u0443\u0434\u0438\u044e.<\/p>\n<p>  \u041e\u0442\u043a\u0440\u044b\u043b solution. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u0442\u044c \u043c\u0435\u043d\u044e PVS-Studio, \u0430 \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u00abCurrent Project\u00bb. \u0421\u0434\u0435\u043b\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u0421\u043d\u0438\u0437\u0443 \u0432 \u0421\u0442\u0443\u0434\u0438\u0438 \u0432\u0441\u043f\u043b\u044b\u043b\u043e \u043e\u043a\u043d\u043e \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0412 \u0444\u043e\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435 \u0438 \u043e\u043a\u043d\u043e \u0441 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043d\u043e \u044f \u0435\u0433\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0438\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c.<\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h3>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0432\u0441\u0435 1253 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 9 \u043c\u0438\u043d\u0443\u0442 \u0438 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u041a \u043a\u043e\u043d\u0446\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  \u0412 \u043e\u043a\u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e 81 High, 109 Medium \u0438 175 Low \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u0445. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 0.06 High \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \/ \u0444\u0430\u0439\u043b, 0.09 Medium \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \/ \u0444\u0430\u0439\u043b, \u0438 0.14 Low \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \/ \u043d\u0430 \u0444\u0430\u0439\u043b. \u0418\u043b\u0438 <br \/>  0.74 High \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u044b\u0441\u044f\u0447\u0443 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, 0.99 Medium \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u044b\u0441\u044f\u0447\u0443 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0438 1.59 Low \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u044b\u0441\u044f\u0447\u0443 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. <\/p>\n<p>  \u0412\u043e\u0442 <a href=\"https:\/\/habr.com\/company\/pvs-studio\/blog\/328354\/\">\u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e<\/a>, \u0447\u0442\u043e \u0432 CruiseControl.NET \u043f\u0440\u0438 \u0435\u0433\u043e 256 \u0442\u044b\u0441\u044f\u0447\u0430\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u043b 15 High, 151 Medium \u0438 32 Low \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0434\u043b\u044f Docotic.Pdf \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<h3>\u0427\u0442\u043e \u0436\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e?<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f Low \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435. <\/p>\n<p>  \u041e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u043b\u043e\u043d\u043a\u0435 Code \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c \u0440\u0435\u043a\u043e\u0440\u0434\u0441\u043c\u0435\u043d\u043e\u043c \u043f\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u0441\u0442\u0430\u043b\u0438 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> \u00abExpression is always true\/false\u00bb \u0438 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3063\/\">V3063<\/a> \u00abA part of conditional expression is always true\/false if it is evaluated\u00bb. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0431 \u043e\u0434\u043d\u043e\u043c. \u0412 \u0441\u0443\u043c\u043c\u0435 \u044d\u0442\u0438 \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u0430\u044e\u0442 92 \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0437 190. \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 = 48%.<\/p>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 High \u0438 Medium \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u044f\u0441\u043d\u0430. \u042f \u043e\u0436\u0438\u0434\u0430\u043b <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3072\/\">V3072<\/a> \u00abThe &#8216;A&#8217; class containing IDisposable members does not itself implement IDisposable\u00bb \u0438 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3073\/\">V3073<\/a> \u00abNot all IDisposable members are properly disposed. Call &#8216;Dispose&#8217; when disposing &#8216;A&#8217; class\u00bb \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 High, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. \u041d\u043e \u044d\u0442\u043e \u0432\u043a\u0443\u0441\u043e\u0432\u0449\u0438\u043d\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e.<\/p>\n<p>  \u0423\u0434\u0438\u0432\u0438\u043b\u043e, \u0447\u0442\u043e <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3095\/\">V3095<\/a> \u00abThe object was used before it was verified against null. Check lines: N1, N2\u00bb \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043a\u0430\u043a High \u0438 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043a\u0430\u043a Medium. \u0411\u0430\u0433?<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kz\/dk\/e8\/kzdke88cvkewlgqplmw4xlp55ym.png\"><\/p>\n<h3>\u0414\u043e\u0432\u0435\u0440\u044f\u0439, \u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439<\/h3>\n<p>  \u041d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u041d\u0430\u0439\u0434\u0435\u043d\u044b \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438? \u0415\u0441\u0442\u044c \u043b\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f?<\/p>\n<p>  \u042f \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<h4>\u0412\u0430\u0436\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0418\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0448\u0438\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0443\u0442\u0435\u0447\u043a\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0442.\u043f. \u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438\/\u043d\u0435\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e 16 \u0448\u0442\u0443\u043a, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 8% \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3019\/\">V3019<\/a> \u00abPossibly an incorrect variable is compared to null after type conversion using &#8216;as&#8217; keyword. Check variables &#8216;color&#8217;, &#8216;indexed&#8217;\u00bb<\/p>\n<pre><code class=\"cs\">public override bool IsCompatible(ColorImpl color) {     IndexedColorImpl indexed = color as IndexedColorImpl;     if (color == null)         return false;      return indexed.ColorSpace.Equals(this); } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0432\u043c\u0435\u0441\u0442\u043e indexed, \u0441 null \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f color. \u042d\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a NRE.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> \u00abPossible null dereference. Consider inspecting &#8216;cstr_index.tile_index&#8217;\u00bb<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<pre><code class=\"cs\">if (cstr_index.tile_index == null) {     if (cstr_index.tile_index[0].tp_index == null)     {         \/\/ ..     } } <\/code><\/pre>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u043b\u043e\u0441\u044c != null. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u043a\u043e\u0434 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043a\u0438\u043d\u0435\u0442 NRE. <\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3083\/\">V3083<\/a> \u00abUnsafe invocation of event &#8216;OnProgress&#8217;, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.\u00bb<\/p>\n<pre><code class=\"cs\">public void Updated() {     if (OnProgress != null)         OnProgress(this, new EventArgs()); } <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c? \u041d\u0430 Stackoverflow \u0435\u0441\u0442\u044c <a href=\"https:\/\/stackoverflow.com\/q\/3668953\/249690\">\u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/a>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3106\/\">V3106<\/a> \u00abPossibly index is out of bounds. The &#8216;0&#8217; index is pointing beyond &#8216;v&#8217; bound\u00bb  <\/p>\n<pre><code class=\"cs\">var result = new List&lt;FontStringPair&gt;(); for (int i = 0; i &lt; text.Length; ++i) {     var v = new List&lt;FontStringPair&gt;();     createPairs(text[i].ToString(CultureInfo.InvariantCulture));     result.Add(v[0]); } <\/code><\/pre>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 createPairs \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043f\u0443\u0441\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443. \u0412\u0438\u0434\u0438\u043c\u043e, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e createPairs \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u0430 \u0431\u044b\u043b\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. <\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3117\/\">V3117<\/a> \u00abConstructor parameter &#8216;validateType&#8217; is not used<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u0434\u0430, \u043f\u043e\u0445\u043e\u0436\u0435\u0433\u043e \u043d\u0430 \u0442\u0430\u043a\u043e\u0439  <\/p>\n<pre><code class=\"cs\">public SomeClass(IDocument document, bool validateType = true)     : base(document, true) {     m_provider = document; } <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f optional \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 validateType \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3127\/\">V3127<\/a> \u201eTwo similar code fragments were found. Perhaps, this is a typo and &#8216;range&#8217; variable should be used instead of &#8216;domain&#8217;\u201c  <\/p>\n<pre><code class=\"cs\">private void fillTransferFunction(PdfStreamImpl function) {     \/\/ ..     PdfArrayImpl domain = new PdfArrayImpl();     domain.AddReal(0);     domain.AddReal(1);     function.Add(Field.Domain, domain);      PdfArrayImpl range = new PdfArrayImpl();     range.AddReal(0);     range.AddReal(1);     function.Add(Field.Range, domain);     \/\/ .... } <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u043e, \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0447\u0443\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 copy-paste \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430.<\/p>\n<h4>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435\/\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041e\u043d\u0438 \u043b\u0438\u0431\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b, \u043d\u043e \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430. \u041b\u0438\u0431\u043e \u043e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u043e \u0435\u0435 \u043d\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. <\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e 57 \u0448\u0442\u0443\u043a, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 30% \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u042f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3013\/\">V3013<\/a> \u201eIt is odd that the body of &#8216;BeginText&#8217; function is fully equivalent to the body of &#8216;EndText&#8217; function (166, line 171)\u201c  <\/p>\n<pre><code class=\"cs\">public override void BeginText() {     m_state.ResetTextParameters(); }  public override void EndText() {     m_state.ResetTextParameters(); } <\/code><\/pre>\n<p>  \u0423 \u043e\u0431\u0435\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0442\u0435\u043b\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0418 \u0442\u0430\u043a \u043b\u0438 \u0443\u0436 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442? <\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3106\/\">V3106<\/a> \u201ePossible negative index value. The value of &#8216;c1&#8217; index could reach -1\u201c  <\/p>\n<pre><code class=\"cs\">freq[256] = 1; \/\/ .... c1 = -1; v = 1000000000L; for (i = 0; i &lt;= 256; i++) {     if (freq[i] != 0 &amp;&amp; freq[i] &lt;= v)     {         v = freq[i];         c1 = i;     } }  \/\/ .... freq[c1] += freq[c2]; <\/code><\/pre>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u043d\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u044f \u043f\u0440\u0438\u0432\u0435\u043b. \u041d\u043e, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0440\u044f \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0435\u0442.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3107\/\">V3107<\/a> \u201eIdentical expression &#8216;neighsum&#8217; to the left and to the right of compound assignment\u201c<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c:  <\/p>\n<pre><code class=\"cs\">neighsum += neighsum; <\/code><\/pre>\n<p>  \u0414\u0430, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. \u041d\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0443\u0442 \u043d\u0435\u0442.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3109\/\">V3109<\/a> \u201eThe &#8216;l_cblk.data_current_size&#8217; sub-expression is present on both sides of the operator. The expression is incorrect or it can be simplified.\u201c  <\/p>\n<pre><code class=\"cs\">\/* Check possible overflow on size *\/ if ((l_cblk.data_current_size + l_seg.newlen) &lt; l_cblk.data_current_size) {     \/\/ ... } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435 \u043f\u043e\u044f\u0441\u043d\u044f\u0435\u0442 \u0437\u0430\u043c\u044b\u0441\u0435\u043b. \u0421\u043d\u043e\u0432\u0430 \u043b\u043e\u0436\u043d\u0430\u044f \u0442\u0440\u0435\u0432\u043e\u0433\u0430.<\/p>\n<h4>\u041e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0418\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043d\u0430 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0442.\u043f. \u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u2014 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e 103 \u0448\u0442\u0443\u043a\u0438, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 54% \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3008\/\">V3008<\/a> \u201eThe &#8216;l_mct_deco_data&#8217; variable is assigned values twice successively. Perhaps this is a mistake\u201c  <\/p>\n<pre><code class=\"cs\">if (m_nb_mct_records == m_nb_max_mct_records) {     ResizeMctRecords();     l_mct_deco_data = (OPJ_INT32)m_nb_mct_records; }  l_mct_deco_data = (OPJ_INT32)m_nb_mct_records; <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0430\u0432: \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 if \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3009\/\">V3009<\/a> \u201eIt is odd that this method always returns one and the same value\u201c  <\/p>\n<pre><code class=\"cs\">private static bool opj_dwt_decode_tile(opj_tcd_tilecomp_t tilec, OPJ_UINT32 numres) {     if (numres == 1U)         return true;      \/\/ ...              return true; } <\/code><\/pre>\n<p>  \u041f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434 \u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> \u201eExpression &#8216;!add&#8217; is always true\u201c  <\/p>\n<pre><code class=\"cs\">private void addToFields(PdfDictionaryImpl controlDict, bool add) {     \/\/ ...     if (add)     {         \/\/ ..         return;     }      if (!add)     {         \/\/ ...     }          \/\/ ... } <\/code><\/pre>\n<p>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c if. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3029\/\">V3029<\/a> \u201eThe conditional expression of the &#8216;if&#8217; statements situated alongside each other are identical\u201c  <\/p>\n<pre><code class=\"cs\">if (stroke)     extGState.OpacityStroke = opacity;  if (stroke)     state.AddReal(Field.CA, opacity); <\/code><\/pre>\n<p>  \u041d\u0435\u044f\u0441\u043d\u043e, \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0432\u043e\u0437\u043d\u0438\u043a. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3031\/\">V3031<\/a> \u201eAn excessive check can be simplified. The &#8216;||&#8217; operator is surrounded by opposite expressions\u201c<\/p>\n<p>  \u0412\u043e\u0442 \u044d\u0442\u043e \u043a\u043e\u0448\u043c\u0430\u0440\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435:  <\/p>\n<pre><code class=\"cs\">if (!(cp.m_enc.m_tp_on != 0 &amp;&amp;     ((!opj_codec_t.OPJ_IS_CINEMA(cp.rsiz) &amp;&amp; (t2_mode == J2K_T2_MODE.FINAL_PASS)) || opj_codec_t.OPJ_IS_CINEMA(cp.rsiz)))) {     \/\/ ... } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435  <\/p>\n<pre><code class=\"cs\">if (!(cp.m_enc.m_tp_on != 0 &amp;&amp;     (opj_codec_t.OPJ_IS_CINEMA(cp.rsiz) || t2_mode == J2K_T2_MODE.FINAL_PASS))) {     \/\/ ... } <\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3063\/\">V3063<\/a> \u201eA part of conditional expression is always true if it is evaluated: x != null\u201c<br \/>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> \u201eExpression &#8216;x != null&#8217; is always true\u201c<\/p>\n<p>  \u0421\u044e\u0434\u0430 \u044f \u043e\u0442\u043d\u0435\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u0442\u0430\u043a \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u2014 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0439. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043b \u0441\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<h4>\u041d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  False positives. \u0418\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e 14 \u0448\u0442\u0443\u043a, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 7% \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3081\/\">V3081<\/a> \u201eThe &#8216;i&#8217; counter is not used inside a nested loop. Consider inspecting usage of &#8216;j&#8217; counter\u201c<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cs\">for (uint i = 0; i &lt; initialGlyphsCount - 1; ++i) {     for (int j = 0; j &lt; initialGlyphsCount - i - 1; ++j)     {         \/\/ ...     } } <\/code><\/pre>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e i \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\/\">V3125<\/a> \u201eThe object was used after it was verified against null\u201c<\/p>\n<p>  \u041a\u043e\u0434, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cs\">private static int Compare_SecondGreater(cmapEncodingRecord er1, cmapEncodingRecord er2) {     if (er1 == er2)         return 0;      if (er1 != null &amp;&amp; er2 == null)         return 1;      if (er1 == null &amp;&amp; er2 != null)         return -1;      return er1.CompareTo(er2); } <\/code><\/pre>\n<p>  er1 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d null \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 CompareTo().<\/p>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cs\">private static void realloc(ref int[][] table, int newSize) {     int[][] newTable = new int[newSize][];      int existingSize = 0;     if (table != null)         existingSize = table.Length;      for (int i = 0; i &lt; existingSize; i++)         newTable[i] = table[i];      for (int i = existingSize; i &lt; newSize; i++)         newTable[i] = new int[4];      table = newTable; } <\/code><\/pre>\n<p>  table \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e null \u0432 \u0446\u0438\u043a\u043b\u0435.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3134\/\">V3134<\/a> \u201eShift by [32..255] bits is greater than the size of &#8216;UInt32&#8217; type of expression &#8216;(uint)1&#8217;\u201c<\/p>\n<p>  \u041a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cs\">byte bitPos = (byte)(numBits &amp; 0x1F); uint mask = (uint)1 &lt;&lt; bitPos; <\/code><\/pre>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e bitPos \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 [0..31], \u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 [0..255], \u0447\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b.<\/p>\n<h4>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a<\/h4>\n<p>  \u041c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e &#8216;x != null&#8217; is always true \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 x \u2014 \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cs\">private X GetX(int y) {     if (y &gt; 0)        return new X(...);      if (y == 0)        return new X(...);      throw new ArgumentOutOfRangeException(nameof(x)); }  private Method() {     \/\/ ...     X x = GetX(..);     if (x != null)     {        \/\/ ...     } } <\/code><\/pre>\n<p>  \u0414\u0430, \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0430\u0432: x \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0440\u0430\u0432\u043d\u043e null, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e GetX \u043b\u0438\u0431\u043e \u0432\u0435\u0440\u043d\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 instance, \u043b\u0438\u0431\u043e \u043a\u0438\u043d\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442 \u043b\u0438 \u043a\u043e\u0434 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 null? \u0427\u0442\u043e \u0435\u0441\u043b\u0438 GetX \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043f\u043e\u0437\u0436\u0435? \u041e\u0431\u044f\u0437\u0430\u043d \u043b\u0438 Method \u0437\u043d\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e GetX? <\/p>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c. \u0412\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c null. \u0418 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u201e\u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435\u201c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435. \u0410 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u2014 \u043d\u0430\u0434\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>  \u0412 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a\u043e\u0435 \u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 null \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0432 try\/catch \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043d\u0430\u0447\u043d\u0435\u0442 \u0431\u0440\u043e\u0441\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/YAGNI\">YAGNI<\/a>, \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0438\u0445. \u0412\u0441\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u0438\u0437 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445\/\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0432 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u043c\u043d\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430. PVS-Studio \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. <\/p>\n<p>  \u0414\u0430, \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \/ \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u041d\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 PVS-Studio \u043d\u0430\u0448\u0435\u043b \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0433\u0434\u0435 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Code Analysis. \u041d\u0430\u0448 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043a\u0440\u044b\u0442 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u0435\u0433\u043e \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0448\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u043d\u043e <s>robots do it better<\/s> \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u0443.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<h4>\u0422\u043e\u043f-3 \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439<\/h4>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3081\/\">V3081<\/a> \u201eThe &#8216;X&#8217; counter is not used inside a nested loop. Consider inspecting usage of &#8216;Y&#8217; counter\u201c<br \/>  1 \u0438\u0437 1 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043e \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\">V3125<\/a> \u201eThe object was used after it was verified against null. Check lines: N1, N2\u201c<br \/>  9 \u0438\u0437 10 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3134\/\">V3134<\/a> \u201eShift by N bits is greater than the size of type\u201c<br \/>  4 \u0438\u0437 5 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<h4>\u0422\u043e\u043f-3 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439<\/h4>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3083\/\">V3083<\/a> \u201eUnsafe invocation of event, NullReferenceException is possible. Consider assigning event to a local variable before invoking it\u201c<br \/>  5 \u0438\u0437 5 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u0432\u0430\u0436\u043d\u044b\u043c\u0438<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3020\/\">V3020<\/a> \u201eAn unconditional &#8216;break\/continue\/return\/goto&#8217; within a loop\u201c<br \/>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> \u201ePossible null dereference\u201c<br \/>  2 \u0438\u0437 2 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u0432\u0430\u0436\u043d\u044b\u043c\u0438<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3019\/\">V3019<\/a> \u201eIt is possible that an incorrect variable is compared with null after type conversion using &#8216;as&#8217; keyword\u201c<br \/>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3127\/\">V3127<\/a> \u201eTwo similar code fragments were found. Perhaps, this is a typo and &#8216;X&#8217; variable should be used instead of &#8216;Y&#8217;\u201c<br \/>  1 \u0438\u0437 1 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u043c<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/425741\/\"> https:\/\/habr.com\/post\/425741\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tt\/fj\/-u\/ttfj-uhwy2ogamewgz6zit48lni.png\" alt=\"Docotic.Pdf \u0438 PVS-studio\"><\/p>\n<p>  \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e. \u0418 \u043e PVS-Studio \u043c\u044b \u043d\u0430\u0441\u043b\u044b\u0448\u0430\u043d\u044b. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c Docotic.Pdf \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-290490","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290490"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290490\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}