{"id":271900,"date":"2016-01-11T14:30:02","date_gmt":"2016-01-11T11:30:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=271900"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=271900","title":{"rendered":"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c IronPython \u0438 IronRuby \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio"},"content":{"rendered":"<p>       \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 C# \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u043a\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043b\u0438\u0437\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u044f \u0432\u0437\u044f\u043b IronPython \u0438 IronRuby. \u0410 \u0440\u0430\u0437 \u044d\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e-\u043e\u0442\u0447\u0451\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/151\/718\/fc4\/151718fc401e86e72f3fc8ce459e0e1d.png\" align=\"left\"\/><\/p>\n<h2>IronPython \u0438 IronRuby<\/h2>\n<p>  IronPython \u0438 IronRuby \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python \u0438 Ruby \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 .NET. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 GitHub \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/IronLanguages\/main\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0438\u0434\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dynamic_Language_Runtime\">DLR<\/a>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 .NET Framework 4.0 DLR \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c\u044e, \u0438 IronPython \u0438 IronRuby \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0451. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u044f \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0441\u0442\u0430\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e DLR, \u0440\u0430\u0437 \u0443\u0436 \u043e\u043d\u0430 \u0442\u0430\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: DLR, IronPython \u0438 IronRuby \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1630 *.cs \u0444\u0430\u0439\u043b\u043e\u0432. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b PVS-Studio 6.00, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">\u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/a>. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043d\u044f\u043b\u0430 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0438\u043d\u0443\u0442\u044b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b 34 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e, 15 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438 280 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.<\/p>\n<p>  \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0437 34 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 19 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, 6 \u043c\u0435\u0441\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2014 \u043d\u0430 \u043d\u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 9 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0441\u0430\u043c\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<h2>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h2>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio:<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440\u044b 1 \u0438 2. \u041d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/b>   <\/p>\n<pre><code class=\"cpp\">private bool Enter(RangeExpression\/*!*\/ node, bool isCondition) {     ....     if (!isCondition &amp;&amp; litBegin != null &amp;&amp; litEnd != null         &amp;&amp; litBegin.Value is int &amp;&amp; litBegin.Value is int) {         _result = MakeNode(NodeKind.lit, new Range(             (int)litBegin.Value, (int)litEnd.Value,             node.IsExclusive));     } else {     ....     } .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0381\/\">V3001<\/a> There are identical sub-expressions &#8216;litBegin.Value is int&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. IronRubyParseTreeOps.cs 277 <\/p>\n<p>  \u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0447\u0442\u043e litBegin.Value \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f int \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c litEnd.Value.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0451 \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0434\u0435\u0441\u044c:  <\/p>\n<pre><code class=\"cpp\">private static PythonTuple ReduceProtocol2(     CodeContext\/*!*\/ context, object self) {     ....     if (self is PythonDictionary || self is PythonDictionary) {         dictIterator = PythonOps.Invoke(context, self,             &quot;iteritems&quot;, ArrayUtils.EmptyObjects);     }     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0381\/\">V3001<\/a> There are identical sub-expressions &#8216;self is PythonDictionary&#8217; to the left and to the right of the &#8216;||&#8217; operator. IronPython ObjectOps.cs 452<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 3. \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/b>   <\/p>\n<pre><code class=\"cpp\">protected override MSAst.Expression VisitTry(     MSAst.TryExpression node) {     ....     if (newHandlers != null || newFinally != null) {         node = Ast.MakeTry(node.Type, node.Body,             newFinally != null ? newFinally : node.Finally,             node.Fault,             newHandlers != null ? newHandlers : newHandlers         );     }     return node; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0383\/\">V3012<\/a> The &#8216;?:&#8217; operator, regardless of its conditional expression, always returns one and the same value: newHandlers. DebugInfoRewriter.cs 252<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c newHandlers \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c node.Handlers \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 newHandlers \u0431\u0443\u0434\u0435\u0442 null.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440\u044b 4 \u0438 5. \u041d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/b>   <\/p>\n<pre><code class=\"cpp\">public static bool HasValue(RubyContext\/*!*\/ context,     object\/*!*\/ self, object value) {     var strValue = value as MutableString;     if (value == null) {         return false;     }     var clrStrValue = strValue.ConvertToString();     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0388\/\">V3019<\/a> Possibly an incorrect variable is compared to null after type conversion using &#8216;as&#8217; keyword. Check variables &#8216;value&#8217;, &#8216;strValue&#8217;. EnvironmentSingletonOps.cs 189<\/p>\n<p>  \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8216;as&#8217; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043d\u0430 null \u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443.<\/p>\n<p>  \u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439:  <\/p>\n<pre><code class=\"cpp\">private static RubyRegex\/*!*\/ ConstructRubyRegexp(     RubyConstructor\/*!*\/ ctor, Node\/*!*\/ node) {     ScalarNode scalar = node as ScalarNode;     if (node == null) {         throw RubyExceptions.CreateTypeError(             &quot;Can only create regex from scalar node&quot;);     }     Match match = _regexPattern.Match(scalar.Value);     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0388\/\">V3019<\/a> Possibly an incorrect variable is compared to null after type conversion using &#8216;as&#8217; keyword. Check variables &#8216;node&#8217;, &#8216;scalar&#8217;. RubyConstructor.cs 230<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 6. Copy-Paste.<\/b>   <\/p>\n<pre><code class=\"cpp\">private void LoadNewObj(CodeContext\/*!*\/ context) {     PythonTuple args = PopStack() as PythonTuple;     if (args == null) {         throw PythonOps.TypeError(&quot;expected second argument, got {0}&quot;,             DynamicHelpers.GetPythonType(args));     }     PythonType cls = PopStack() as PythonType;     if (args == null) {         throw PythonOps.TypeError(&quot;expected first argument, got {0}&quot;,             DynamicHelpers.GetPythonType(args));     }     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0390\/\">V3021<\/a> There are two &#8216;if&#8217; statements with identical conditional expressions. The first &#8216;if&#8217; statement contains method return. This means that the second &#8216;if&#8217; statement is senseless. cPickle.cs 2194<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0434\u0432\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 GetPythonType() \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e, \u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440 \u0437\u0430\u0431\u044b\u043b. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u043f\u0430\u0440\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 7. \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/b>   <\/p>\n<pre><code class=\"cpp\">public static int Compare(SourceLocation left, SourceLocation right) {     if (left &lt; right) return -1;     if (right &gt; left) return 1;     return 0; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0390\/\">V3021<\/a> There are two &#8216;if&#8217; statements with identical conditional expressions. The first &#8216;if&#8217; statement contains method return. This means that the second &#8216;if&#8217; statement is senseless. SourceLocation.cs 156<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0438 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0433\u0434\u0435. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b left \u0438 right \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<p>  \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"cpp\">public static int Compare(SourceLocation left, SourceLocation right) {     if (left &lt; right) return -1;     if (left &gt; right) return 1;     return 0; }<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 8. \u0418\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/b>   <\/p>\n<pre><code class=\"cpp\">private void WriteSingleQuoted(string text, bool split) {     ....     while (ending &lt;= text.Length) {         c = '\\0';         if (ending &lt; text.Length) {             c = text[ending];         }         if (spaces) {             if (c == 0 || c != 32) {             .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0411\/\">V3023<\/a> Consider inspecting the &#8216;c == 0 || c != 32&#8217; expression. The expression is excessive or contains a misprint. Emitter.cs 308<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;c&#8217; \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 &#8216;\\0&#8217;. \u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432\u0441\u044e \u0441\u0442\u0440\u043e\u043a\u0443, &#8216;c&#8217; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430. \u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;c&#8217; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u0442\u0443\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u043b\u0451\u043c \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u043e\u043b\u044c \u0438 \u0442\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u0435\u043d \u043e\u0442 32 (\u043a\u043e\u0434 \u043f\u0440\u043e\u0431\u0435\u043b\u0430). \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u043d\u043e \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u043b\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0451\u043b \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440\u044b 9 \u0438 10. \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/b> <\/p>\n<p>  \u041e\u0431\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 String.Format \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 String.Format. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043b\u0438\u0431\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 FormatException. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u044b.  <\/p>\n<pre><code class=\"cpp\">public T Current {     get {         try {             return (T)enumerable.Current;         }         catch (InvalidCastException iex) {             throw new InvalidCastException(string.Format( &quot;Error in IEnumeratorOfTWrapper.Current. Could not cast: {0} in {0}&quot;, typeof(T).ToString(), enumerable.Current.GetType().ToString()), iex);         }     } }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0392\/\">V3025<\/a> Incorrect format. A different number of format items is expected while calling &#8216;Format&#8217; function. Expected: 1. Present: 2. ConversionWrappers.cs 235<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 typeof(T).ToString().  <\/p>\n<pre><code class=\"cpp\">private static void DumpGenericParameters(     MetadataTableView genericParams,     MetadataRecord owner) {     foreach (GenericParamDef gp in genericParams) {         _output.WriteLine(&quot;  generic parameter #{0}: {1}&quot;,         gp.Index, gp.Name, gp.Attributes);     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0392\/\">V3025<\/a> Incorrect format. A different number of format items is expected while calling &#8216;WriteLine&#8217; function. Expected: 2. Present: 3. Program.cs 268<\/p>\n<p>  \u0410 \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e WriteLine \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 11. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/b>   <\/p>\n<pre><code class=\"cpp\">public static MutableString ChompInPlace(....) {     MutableString result = InternalChomp(self, separator);     if (result.Equals(self) || result == null) {         self.RequireNotFrozen();         return null;     }     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0414\/\">V3027<\/a> The variable &#8216;result&#8217; was utilized in the logical expression before it was verified against null in the same logical expression. MutableStringOps.cs 1097<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 null \u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 Equals. \u0412 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0430\u0441\u0442\u044c \u0441 NullReferenceException.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 12. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/b>  <\/p>\n<pre><code class=\"cpp\">class DictThreadGlobalState {     public int DoneCount;     .... }  private static void RunThreadTest(DictThreadGlobalState globalState) {     ....     globalState.DoneEvent.Reset();     globalState.Event.Set();     while (globalState.DoneCount != 0) {         \/\/ wait for threads to get back to finish     }     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0419\/\">V3032<\/a> Waiting on this expression is unreliable, as compiler may optimize some of the variables. Use volatile variable(s) or synchronization primitives to avoid this. EngineTest.cs 2558<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430, \u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u0435\u0440\u0441\u0438\u0438 .NET Framework, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0435\u0449\u0451 \u043e\u0442 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f DoneCount \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043a\u0430\u043a volatile, \u0430 \u0440\u0430\u0437 \u0442\u0430\u043a, \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c, \u0438 \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0438\u0437 \u043a\u0435\u0448\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0435\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c, \u043a\u0430\u043a volatile. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/x13ttww7.aspx\">MSDN<\/a>.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 13. \u0414\u0432\u043e\u0439\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435<\/b>  <\/p>\n<pre><code class=\"cpp\">private static Dictionary&lt;string, EncodingInfoWrapper&gt;     MakeCodecsDict() {     ....     switch (normalizedName) {         case &quot;iso_8859_1&quot;:             d[&quot;8859&quot;] = d[&quot;latin_1&quot;] = d[&quot;latin1&quot;] =             d[&quot;iso 8859_1&quot;] = d[&quot;iso8859_1&quot;] = d[&quot;cp819&quot;] = d[&quot;819&quot;] =             d[&quot;latin&quot;] = d[&quot;latin1&quot;] = d[&quot;l1&quot;] = encs[i];             break;     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0403\/\">V3005<\/a> The &#8216;d[\u00ablatin1\u00bb]&#8217; variable is assigned to itself. StringOps.cs 1905<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e d[\u00ablatin1\u00bb]. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434, \u0430 \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430. \u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u0443\u0442 \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u043e \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 14. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u043d\u0443\u043b\u0451\u043c<\/b>  <\/p>\n<pre><code class=\"cpp\">public static int __hash__(UInt64 x) {     int total = unchecked((int) (((uint)x) + (uint)(x &gt;&gt; 32)));     if (x &lt; 0) {         return unchecked(-total);     }     return total; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0391\/\">V3022<\/a> Expression &#8216;x &lt; 0&#8217; is always false. Unsigned type value is always &gt;= 0. IntOps.Generated.cs 1967<\/p>\n<p>  \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441 \u043d\u0443\u043b\u0451\u043c \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c &#8216;total&#8217;, \u0430 \u043d\u0435 &#8216;x&#8217;, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 &#8216;x&#8217; \u0432\u0441\u0435\u0433\u0434\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0414\u0430 \u0438 &#8216;total&#8217; \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u00abtotal &lt; 0\u00bb \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0439.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 15. \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/b>   <\/p>\n<pre><code class=\"cpp\">public void ReflectTypes(Type[]\/*!*\/ allTypes) {     ....     def.Super = null;     if (cls != null &amp;&amp; def.Extends != typeof(BasicObject)         &amp;&amp; !def.Extends.IsInterface) {         if (cls != null &amp;&amp; cls.Inherits != null) {             def.Super = new TypeRef(cls.Inherits);     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0415\/\">V3030<\/a> Recurring check. The &#8216;cls != null&#8217; condition was already verified in line 373. LibraryDef.cs 374<\/p>\n<p>  \u0422\u0443\u0442 \u0432 \u043e\u0431\u043e\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;cls&#8217; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 null. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440 \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c &#8216;def&#8217; \u043d\u0430 null \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 Extends. \u041d\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e \u043f\u0435\u0440\u0435\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0432 &#8216;def.Super&#8217; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f null, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e &#8216;def&#8217; \u0443\u0436\u0435 \u043d\u0435 null. \u0412 \u043e\u0431\u0449\u0435\u043c, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 16. Copy-paste.<\/b> <\/p>\n<p>  \u042f \u0434\u043e\u0448\u0451\u043b \u0434\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0435\u0433\u043e 280 \u0448\u0442\u0443\u043a. \u0418\u0437 \u043d\u0438\u0445 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043b\u0430 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439. \u042f \u043d\u0435 \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0441\u043c\u043e\u0433\u0443 \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u043b \u0431\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043d\u0430\u0448\u0451\u043b.  <\/p>\n<pre><code class=\"cpp\">public static bool IsPositiveOne(BigDecimal x) {     return IsOne(x) &amp;&amp; IsPositive(x); } public static bool IsNegativeOne(BigDecimal x) {     return IsOne(x) &amp;&amp; IsPositive(x); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0389\/\">V3013<\/a> It is odd that the body of &#8216;IsPositiveOne&#8217; function is fully equivalent to the body of &#8216;IsNegativeOne&#8217; function (351, line 355). BigDecimal.cs 351<\/p>\n<p>  \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">public static bool IsNegativeOne(BigDecimal x) {     return IsOne(x) &amp;&amp; IsNegative(x); }<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 17 \u0421\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 NaN.<\/b>   <\/p>\n<pre><code class=\"cpp\">public static bool Equals(float x, float y) {     if (x == y) {         return !Single.IsNaN(x);     }     return x == y; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/d\/0412\/\">V3024<\/a> An odd precise comparison: x == y. Consider using a comparison with defined precision: Math.Abs(A \u2014 B) &lt; Epsilon. FloatOps.cs 1048<\/p>\n<p>  \u042f \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u0432 \u0447\u0451\u043c \u0442\u0443\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 NaN. \u0415\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 (x == y) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0438 &#8216;x&#8217;, \u0438 &#8216;y&#8217; \u043e\u0442\u043b\u0438\u0447\u043d\u044b \u043e\u0442 NaN, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e NaN \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u043d\u0438\u043a\u0430\u043a\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 return \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c true. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 NaN \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u043d\u0430\u0448\u0451\u043b \u043f\u0430\u0440\u0443 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043b\u0443\u0447\u0448\u0435. \u0410 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u0432\u044b\u044f\u0432\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c, \u0443\u043b\u0443\u0447\u0448\u0438\u0432 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0434\u0443\u043a\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0441\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e PVS-Studio \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <a href=\"http:\/\/www.viva64.com\/en\/b\/0367\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/35e\/064\/ddf\/35e064ddf91f5d99b620384893909ff7.png\" \/><\/div>\n<p><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Ilya Ivanov. <a href=\"http:\/\/www.viva64.com\/en\/b\/0367\/\">Analyzing IronPython and IronRuby with PVS-Studio<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441?<\/b><\/p>\n<div class=\"spoiler_text\">\u0427\u0430\u0441\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/www.viva64.com\/ru\/a\/0085\/\">\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e PVS-Studio, \u0432\u0435\u0440\u0441\u0438\u044f 2016<\/a>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c.  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/274863\/\"> http:\/\/habrahabr.ru\/post\/274863\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 C# \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u043a\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043b\u0438\u0437\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u044f \u0432\u0437\u044f\u043b IronPython \u0438 IronRuby. \u0410 \u0440\u0430\u0437 \u044d\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e-\u043e\u0442\u0447\u0451\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/151\/718\/fc4\/151718fc401e86e72f3fc8ce459e0e1d.png\" align=\"left\"\/><\/p>\n<h2>IronPython \u0438 IronRuby<\/h2>\n<p>  IronPython \u0438 IronRuby \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python \u0438 Ruby \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 .NET. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 GitHub \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/IronLanguages\/main\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0438\u0434\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dynamic_Language_Runtime\">DLR<\/a>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 .NET Framework 4.0 DLR \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c\u044e, \u0438 IronPython \u0438 IronRuby \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0451. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u044f \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0441\u0442\u0430\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e DLR, \u0440\u0430\u0437 \u0443\u0436 \u043e\u043d\u0430 \u0442\u0430\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\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-271900","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271900","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=271900"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271900\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=271900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=271900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}