{"id":468808,"date":"2025-07-28T09:00:12","date_gmt":"2025-07-28T09:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468808"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468808","title":{"rendered":"<span>\u041e\u043a\u043d\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443? \u042d\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u0430\u0441\u0442 \u0441\u0432\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0438 \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438 Microsoft, \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0432 Windows Terminal?<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/98f\/190\/8dc\/98f1908dc7a6ae5e815ac655a72edf94.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/98f\/190\/8dc\/98f1908dc7a6ae5e815ac655a72edf94.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/98f\/190\/8dc\/98f1908dc7a6ae5e815ac655a72edf94.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>Windows Terminal \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0430 &#171;\u0423\u0437\u0435\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Windows&#187; \u0432 Windows 11 Sun Valley 2 (\u0432\u0435\u0440\u0441\u0438\u044f 22H2). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Windows, \u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u0440\u0448\u0435 Windows 10 May 2020 Update (\u0432\u0435\u0440\u0441\u0438\u044f 2004). \u041f\u0435\u0440\u0432\u043e\u0435 \u0431\u0440\u043e\u0441\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043a\u043b\u0430\u0434\u043e\u043a \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0448\u0440\u0438\u0444\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, Cascadia Mono. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Visual Studio Code \u0438 Visual Studio 2022.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1c5\/53d\/169\/1c553d16931d9a0fd2e1263f854302bf.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/1c5\/53d\/169\/1c553d16931d9a0fd2e1263f854302bf.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1c5\/53d\/169\/1c553d16931d9a0fd2e1263f854302bf.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e \u0437\u0430\u043c\u0435\u043d\u0435 \u0441\u043e\u0431\u043e\u0439 <code>conhost.exe<\/code> \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043c\u0435\u043b\u044b\u043c \u0441 \u043c\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. Windows Terminal &#171;\u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442&#187; \u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u041a\u0438\u0431\u0435\u0440\u043b\u044e\u0434\u044f\u043c (\u0438\u043b\u0438 \u0430\u0441\u0441\u0438\u043c\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u0411\u043e\u0440\u0433\u0438, \u0435\u0441\u043b\u0438 \u0443\u0433\u043e\u0434\u043d\u043e), \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0432\u043d\u0435\u0448\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 Direct3D \u0438 Quake-\u0440\u0435\u0436\u0438\u043c\u043e\u043c \u043d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/main\/src\/host\/sources.inc\" rel=\"noopener noreferrer nofollow\">\u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c<\/a> \u0436\u0435\u043b\u0435\u0437\u043e\u0431\u0435\u0442\u043e\u043d\u043d\u044b\u043c &#171;\u043b\u0435\u0433\u0430\u0441\u0438&#187;. \u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440 ReactOS \u0438 \u0431\u043e\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443, \u0442\u043e \u0443\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u043f\u043e \u043d\u0435\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <strong>\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0435\u043d<\/strong> \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0433\u043b\u0430\u0437 \u2014 \u0443\u0437\u0435\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Windows \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT, \u0438 \u0442\u043e\u043c\u0443 <a href=\"https:\/\/git.reactos.org\/?p=reactos.git&amp;a=search&amp;h=HEAD&amp;st=commit&amp;s=microsoft%2Fterminal\" rel=\"noopener noreferrer nofollow\">\u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435<\/a>.<\/p>\n<p>\u0423\u0441\u0430\u0436\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043f\u0435\u0440\u0435\u0434 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u043e\u043c \u0441 \u0432\u0430\u0448\u0438\u043c \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c (\u0430 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0447\u0438\u0442\u0430\u0435\u0442\u0435?), PVS-Studio \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PVS-Studio<\/h4>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u043c\u043e\u0436\u043d\u043e \u0441 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/download\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1267\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/a>. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1267\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u0441 \u0434\u043e\u043b\u0433\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0443\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u0438 \u043c\u044b\u0448\u0438. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0437\u0430\u0439\u043c\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Visual Studio 2022. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f PVS-Studio \u2014 7.37.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043d\u0435 \u0437\u0430\u0437\u043e\u0440\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c PVS-Studio \u0432 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0025\/\" rel=\"noopener noreferrer nofollow\">\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \ud83d\ude42<\/p>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/microsoft\/terminal\/tree\/fc0a06c3b6cae2ede1326eef202a800244365ebd\" rel=\"noopener noreferrer nofollow\">fc0a06c<\/a> \u0432 &#171;\u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439&#187; (Release) \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1246\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 CPython<\/a> \u0442\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u043e \u043c\u043d\u0435 \u0440\u0430\u0437\u0433\u043e\u0440\u0435\u043b\u0441\u044f \u0430\u0437\u0430\u0440\u0442, \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u043b\u0438, \u043a\u0430\u043a \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b Fenris \u0438\u0437 Steel Hunters: &#171;\u042f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0433\u043e\u043b\u043e\u0434\u0435\u043d&#8230; \u043f\u0440\u0438\u0432\u0435\u0434\u0438 \u043c\u043d\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e&#187;.<\/p>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u2014 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>PVS-Studio_Cmd.exe<\/code> \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Visual Studio 2022.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b WinGet, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <a href=\"https:\/\/github.com\/microsoft\/terminal\/tree\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/.config\" rel=\"noopener noreferrer nofollow\"><code>.config<\/code><\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439 Community, \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0432 <code>README.md<\/code> \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre><code>winget configure .config\\configuration.winget <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Visual Studio, \u0442\u043e \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u043e\u043a\u043d\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0432\u0430\u0448 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 Visual Studio \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/1243\/\" rel=\"noopener noreferrer nofollow\">PowerShell 7<\/a> \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445.<\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<p>\u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 Windows Terminal \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u044b NuGet, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <em>vcpkg<\/em> \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0441 \u0433\u043b\u0430\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043b\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0444\u0430\u0439\u043b\u044b, \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c\u0438 \u043c\u0430\u0441\u043a\u0430\u043c\u0438 \u043f\u0443\u0442\u0435\u0439:<\/p>\n<pre><code>\\terminal\\oss\\ \\terminal\\obj\\*\\vcpkg\\ \\terminal\\packages\\Microsoft.Windows.ImplementationLibrary*\\ \\Generated Files\\ <\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 PVS-Studio_Cmd, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>.pvsconfig<\/code> \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>\/\/V_EXCLUDE_PATH<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>wt.pvsconfig<\/code>. \u041e\u043d \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043f\u0430\u043f\u043a\u0435 <code>terminal<\/code>, \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Windows Terminal.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Visual Studio 2022 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443: <strong>Extensions &gt; PVS-Studio &gt; Options &gt; Don&#8217;t Check Files<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e <strong>PathMasks<\/strong> \u0438\u043b\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>wt.pvsconfig<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>Shift+Alt+A<\/strong>), \u0438 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u042f \u0431\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043d\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6630\/#exclude_path\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043c\u0435\u043d\u044f \ud83d\ude42<\/p>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437. \u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <code>PVS-Studio_Cmd.exe<\/code> \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 MSBuild \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>PVS-Studio_Cmd.exe -t D:\\Git\\terminal\\OpenConsole.sln ^                    -c Release -p x64 ^                    -C D:\\Git\\terminal\\wt.pvsconfig <\/code><\/pre>\n<p>\u0410 \u0438\u0437 Visual Studio \u2014 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/ea7\/ed0\/341\/ea7ed03419b0a5453297ba330d2d66ba.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/ea7\/ed0\/341\/ea7ed03419b0a5453297ba330d2d66ba.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/ea7\/ed0\/341\/ea7ed03419b0a5453297ba330d2d66ba.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 <code>PVS-Studio_Cmd.exe<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0451\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>.plog<\/code> \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-t<\/code>. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0447\u0451\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-o<\/code>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 <code>.plog<\/code> \u0438 <code>.json<\/code>. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0442\u0447\u0451\u0442\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0038\/\" rel=\"noopener noreferrer nofollow\">\u0432 \u043d\u0430\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u041f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Visual Studio \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430.<\/p>\n<h3>\u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e, C#<\/h3>\n<p>\u042f \u0437\u0430\u0431\u044b\u043b \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0432\u0443\u044f\u0437\u044b\u0447\u043d\u044b\u0439, \u0438 \u0437\u0434\u0435\u0441\u044c <em>\u0447\u0438\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e<\/em> \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430. WinUI 3 \u2014 \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u0435\u0434\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u043e\u043a\u0440\u0443\u0433 \u0447\u0451\u0440\u043d\u043e\u0439 \u043f\u0435\u043b\u0435\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430 \u043d\u0451\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b \u2014 \u043c\u043e\u044f \u0441\u043e\u0432\u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0442\u0430. \u041c\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u0432 C++. \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043d\u044b\u0435, \u0438 \u0438\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041e\u0431\u0435\u0449\u0430\u044e!<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u0432\u043e\u0439\u043a\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 PVS-Studio, \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f N1:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3061\/\" rel=\"noopener noreferrer nofollow\">V3061<\/a> Parameter &#8216;sbiexOriginal&#8217; is always rewritten in method body before being used. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L404\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 404<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3061\/\" rel=\"noopener noreferrer nofollow\">V3061<\/a> Parameter &#8216;sbiex&#8217; is always rewritten in method body before being used. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L409\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 409<\/a><\/p>\n<pre><code class=\"cs\">private void TestScrollByOverflowImpl(     CmdApp app, ViewportArea area, IntPtr hConsole,     WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiex,     Queue&lt;EventData&gt; expected,     WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiexOriginal ) {     \/\/ Get original screen information     sbiexOriginal = app.GetScreenBufferInfo();                  \/\/ &lt;=     short promptLineEnd = sbiexOriginal.dwCursorPosition.X;     promptLineEnd--; \/\/ prompt line ended one position left of cursor      \/\/ Resize the window to only have two lines left at the bottom     \/\/ to test overflow when we echo some text     sbiex = sbiexOriginal;                                      \/\/ &lt;=     .... } <\/code><\/pre>\n<p>\u0418\u043d\u0446\u0438\u0434\u0435\u043d\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0432 <strong>\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c<\/strong> unit-\u0442\u0435\u0441\u0442\u0435. \u042d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e\u043a\u0440\u044b\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c <a href=\"https:\/\/github.com\/microsoft\/terminal\/issues\/7282\" rel=\"noopener noreferrer nofollow\">issue<\/a> \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.  \u0410\u0432\u0442\u043e\u0440 \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u043e\u043d &#171;\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0442\u0435\u0441\u0442\u044b, \u0438\u0445 \u043d\u0430\u0434\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443&#187;. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u044f \u0438\u043c \u0434\u0430\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u043d\u043e \u043d\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u043e\u0442 PVS-Studio, \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f N2:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3115\/\" rel=\"noopener noreferrer nofollow\">V3115<\/a> Passing &#8216;null&#8217; to &#8216;Equals&#8217; method should not result in &#8216;NullReferenceException&#8217;. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L65\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 65<\/a><\/p>\n<pre><code class=\"cs\">public override bool Equals(object obj) {     if (typeof(EventData) == obj.GetType())     {         return Equals((EventData)obj);     }     else     {         return base.Equals(obj);     } } <\/code><\/pre>\n<p><code>obj<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0435\u043c \u0443\u0433\u043e\u0434\u043d\u043e, \u0438 \u0434\u0430\u0436\u0435 <code>null<\/code>. \u0418 \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 <code>null<\/code>, \u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0451\u043c \u0432 \u0432\u0435\u0442\u043a\u0443 <code>else<\/code>, \u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c <s>\u0442\u043e\u0440\u0442<\/s> NRE \u0432 \u043b\u0438\u0446\u043e. \u0418\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cs\">if (obj == null)     return false;  if (typeof(EventData) == obj.GetType()) {     return Equals((EventData)obj); } <\/code><\/pre>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f N3:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3137\/\" rel=\"noopener noreferrer nofollow\">V3137<\/a> The &#8216;fSuccess&#8217; variable is assigned but is not used by the end of the function. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/tools\/vtapp\/Program2.cs#L80\" rel=\"noopener noreferrer nofollow\">Program2.cs 80<\/a><\/p>\n<pre><code class=\"cs\">public static void enableVT() {     IntPtr hCon = Pinvoke.GetStdHandle(Pinvoke.STD_OUTPUT_HANDLE);      int mode;     bool fSuccess = Pinvoke.GetConsoleMode(hCon, out mode);      if (fSuccess)     {         mode |= Pinvoke.ENABLE_VIRTUAL_TERMINAL_PROCESSING;         fSuccess = Pinvoke.SetConsoleMode(hCon, mode);           \/\/ &lt;=     } } <\/code><\/pre>\n<p>\u0418 \u043a \u043d\u0435\u043c\u0443 \u0432 \u043f\u0440\u0438\u0434\u0430\u0447\u0443 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/tools\/vtapp\/Program2.cs#L92\" rel=\"noopener noreferrer nofollow\"><code>disableVT()<\/code><\/a> \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c, \u043d\u0435 \u0438\u043d\u0430\u0447\u0435 \u043a\u0430\u043a &#171;\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430&#187;:<\/p>\n<ul>\n<li>\n<p>V3137 The &#8216;fSuccess&#8217; variable is assigned but is not used by the end of the function. Program2.cs 92<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/windows\/console\/setconsolemode\" rel=\"noopener noreferrer nofollow\"><code>SetConsoleMode<\/code><\/a> \u0438\u0437 Windows API \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043d\u043e \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438, \u043b\u0438\u0431\u043e&#8230; \u044d\u0442\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0441 \u0432\u044b\u0437\u043e\u0432\u0430 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/windows\/console\/getconsolemode\" rel=\"noopener noreferrer nofollow\"><code>GetConsoleMode<\/code><\/a>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 <code>bool<\/code>, \u0443 \u043e\u0431\u0435\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Windows \u0438 Windows 10 Threshold 1 (\u0432\u0435\u0440\u0441\u0438\u044f 1507), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/console\/console-virtual-terminal-sequences\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 VT100 \u0438 \u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445<\/a>.<\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b UB\u0438\u0432\u0430\u044e\u0442<\/h3>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f, \u0430 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u044f \u043e\u0431\u0435\u0449\u0430\u043b, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c\u0443. \u041d\u0435 \u0441\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u2014 \u043b\u0435\u0442\u0438\u043c \u043f\u0440\u044f\u043c\u043e\u0439 \u043d\u0430\u0432\u043e\u0434\u043a\u043e\u0439 \u0432 C++!<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v783\/\" rel=\"noopener noreferrer nofollow\">V783<\/a> [CERT-CTR51-CPP] Dereferencing of the invalid iterator &#8216;shades.end()&#8217; might take place. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/cascadia\/TerminalApp\/ColorHelper.cpp#L194\" rel=\"noopener noreferrer nofollow\">ColorHelper.cpp 194<\/a><\/p>\n<pre><code class=\"cpp\">winrt::Windows::UI::Color ColorHelper::GetAccentColor(     const winrt::Windows::UI::Color&amp; color ) {     ....     auto shades = std::map&lt;float, HSL&gt;();     ....      \/\/ 3f is quite nice if the whole non-client area is painted     constexpr auto readability = 1.75f;     for (auto shade : shades)     {         if (shade.first &gt;= readability)         {             return HslToRgb(shade.second);         }     }     return HslToRgb(shades.end()-&gt;second);    \/\/ &lt;= } <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043b\u0438, \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u0438\u043d \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438? \u0422\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0430. \u0417\u0434\u0435\u0441\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e <em>\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f<\/em> <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/terms\/0066\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a>, \u0438 \u043f\u0441\u0438\u0445\u043e\u0431\u0443\u043c\u0430\u0433\u0443 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <code>std::map::end()<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0432 <code>std::map<\/code>.<\/p>\n<h3>\u0422\u0435\u043b\u0435\u043f\u0430\u0442\u044b \u0432 \u043e\u0442\u043f\u0443\u0441\u043a\u0435<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1004\/\" rel=\"noopener noreferrer nofollow\">V1004<\/a> [CERT-EXP34-C] The &#8216;pSettings&#8217; pointer was used unsafely after it was verified against nullptr. Check lines: 199, 211. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/interactivity\/win32\/window.cpp#L211\" rel=\"noopener noreferrer nofollow\">window.cpp 211<\/a><\/p>\n<pre><code class=\"cpp\">[[nodiscard]] NTSTATUS Window::_MakeWindow(     _In_ Settings* const pSettings,     _In_ SCREEN_INFORMATION* const pScreen ) {     auto&amp; g = ServiceLocator::LocateGlobals();     auto&amp; gci = g.getConsoleInformation();     auto status = STATUS_SUCCESS;      if (pSettings == nullptr)                   &lt;=     {         status = STATUS_INVALID_PARAMETER_1;     }     ....      const auto useDx = pSettings-&gt;GetUseDx();   &lt;=     try     { #if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED         if (useDx)         {             pAtlasEngine = new AtlasEngine();             g.pRender-&gt;AddRenderEngine(pAtlasEngine);         }         else #endif         ....     }         catch (...)     {        status = NTSTATUS_FROM_HRESULT(wil::ResultFromCaughtException());     }     .... } <\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0437\u0434\u0435\u0441\u044c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u044e\u0434\u0430 \u043f\u043e\u043f\u0430\u043b\u043e? \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>pSettings<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <code>nullptr<\/code>. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u044d\u0442\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441.<\/p>\n<pre><code class=\"cpp\">if (pSettings == nullptr) {     status = STATUS_INVALID_PARAMETER_1; } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043c\u044b \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c <code>nullptr<\/code>, \u0438 \u0437\u0430\u0442\u0435\u043c <strong>\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f<\/strong> \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u0437 <code>nullptr<\/code>. \u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u0447\u044c\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u0435\u0439\u0448\u0438\u0439 <code>ERROR_ACCESS_VIOLATION<\/code>. \u041f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"cpp\">const auto useDx = pSettings-&gt;GetUseDx(); <\/code><\/pre>\n<p>\u0418 \u043d\u0435\u0442, \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0431\u043b\u043e\u043a <code>try<\/code>&#8212;<code>catch<\/code> \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <a href=\"https:\/\/stackoverflow.com\/questions\/1823721\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<\/a>, \u0438 \u0432 C++ \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 NPE. \u041a\u0442\u043e-\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build\/reference\/eh-exception-handling-model?view=msvc-170\" rel=\"noopener noreferrer nofollow\"><code>\/EHa<\/code><\/a> \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>catch(...)<\/code>, \u043d\u043e \u0434\u0430\u0436\u0435 Microsoft <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build\/reference\/eh-exception-handling-model?view=msvc-170#structured-and-standard-c-exception-handling\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u043e\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a>:<\/p>\n<blockquote>\n<p>Specifying <code>\/EHa<\/code> and trying to handle all exceptions by using <code>catch(...)<\/code> can be dangerous. In most cases, asynchronous exceptions are unrecoverable and should be considered fatal. Catching them and proceeding can cause process corruption and lead to bugs that are hard to find and fix.<\/p>\n<p>Even though Windows and Visual C++ support SEH, we strongly recommend that you use ISO-standard C++ exception handling (<code>\/EHsc<\/code> or <code>\/EHs<\/code>). It makes your code more portable and flexible.<\/p>\n<\/blockquote>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u0438\u0434\u0451\u0442 &#171;\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430&#187; \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0451\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>status<\/code> \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435 \u0436\u0434\u0430\u043b \u0443\u0441\u043f\u0435\u0445.<\/p>\n<pre><code class=\"cpp\">catch (...) {     status = NTSTATUS_FROM_HRESULT(wil::ResultFromCaughtException()); }  if (SUCCEEDED_NTSTATUS(status)) {     .... } return status; <\/code><\/pre>\n<p>\u0416\u0430\u043b\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&#8230; \u0432\u0435\u0440\u043d\u0435\u0435, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h3>COM \u0432 \u0433\u043e\u0440\u043b\u0435<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1114\/\" rel=\"noopener noreferrer nofollow\">V1114<\/a> Suspicious use of &#8216;static_cast&#8217; when working with COM interfaces. Consider using the &#8216;QueryInterface&#8217; member function. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/interactivity\/win32\/uiaTextRange.cpp#L84\" rel=\"noopener noreferrer nofollow\">uiaTextRange.cpp 84<\/a><\/p>\n<pre><code class=\"cpp\">namespace Microsoft::Console::Types {     class ScreenInfoUiaProviderBase :         public WRL::RuntimeClass&lt;             WRL::RuntimeClassFlags&lt;WRL::ClassicCom | WRL::InhibitFtmBase&gt;,             IRawElementProviderSimple,             IRawElementProviderFragment,             ITextProvider         &gt;,         public IUiaTraceable     .... }  namespace Microsoft::Console::Interactivity::Win32 {     class ScreenInfoUiaProvider final :         public Microsoft::Console::Types::ScreenInfoUiaProviderBase     {         ....     }     .... }  HWND UiaTextRange::_getWindowHandle() const {     const auto provider = static_cast&lt;ScreenInfoUiaProvider*&gt;(_pProvider); \/\/ &lt;=     return provider-&gt;GetWindowHandle(); } <\/code><\/pre>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/cppcx\/wrl\/windows-runtime-cpp-template-library-wrl?view=msvc-170\" rel=\"noopener noreferrer nofollow\">Windows Runtime C++ Template Library<\/a>, \u043e\u043d\u0430 \u0436\u0435 WRL, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 COM-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0430\u0434\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0430 \u0435\u0441\u0442\u044c \u043b\u0438 \u0434\u043e \u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f, \u0438 \u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d \u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. &#171;\u0413\u0440\u0443\u0431\u043e\u0435&#187; \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0438 \u0442\u043e\u0433\u043e, \u043d\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e, \u043a\u0430\u043a \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u044d\u0442\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/win32\/api\/unknwn\/nf-unknwn-iunknown-queryinterface(refiid_void)\" rel=\"noopener noreferrer nofollow\"><code>QueryInterface()<\/code><\/a>, \u0438 \u0442\u043e\u0433\u0434\u0430 COM \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u043c\u043e\u043d\u0441\u0442\u0440\u043e\u043c \u043f\u043e\u0434 \u043a\u0440\u043e\u0432\u0430\u0442\u044c\u044e, \u043f\u0443\u0433\u0430\u044e\u0449\u0438\u043c \u0432\u0430\u0441 \u0432 \u043d\u043e\u0447\u0438. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u043b \u0441\u044e\u0440\u043f\u0440\u0438\u0437&#8230; \u0434\u043b\u044f <code>ScreenInfoUiaProvider<\/code> \u043d\u0435 \u0431\u044b\u043b \u0432\u044b\u0434\u0435\u043b\u0435\u043d IID, \u0438 \u0432\u044b\u0437\u043e\u0432 <code>QueryInterface()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c!<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/0d0\/a01\/e1e\/0d0a01e1ebe9855d24062329f79a9f1a.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/0d0\/a01\/e1e\/0d0a01e1ebe9855d24062329f79a9f1a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/0d0\/a01\/e1e\/0d0a01e1ebe9855d24062329f79a9f1a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0438\u0437\u0430 \u0432 COM \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u043c\u043e\u0435\u0439, \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435, \u043d\u0435 \u043e\u0442\u043a\u0430\u0436\u0443\u0441\u044c \u043e\u0442 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u043f\u043e \u043c\u043d\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u0448\u043c\u0430\u0440 \ud83d\ude42<\/p>\n<h3>\u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0431\u0443\u0440\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v519\/\" rel=\"noopener noreferrer nofollow\">V519<\/a> [CERT-MSC13-C] The &#8216;delayedLineBreak&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2938, 2941. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/buffer\/out\/textBuffer.cpp#L2941\" rel=\"noopener noreferrer nofollow\">textBuffer.cpp 2941<\/a><\/p>\n<pre><code class=\"cpp\">void TextBuffer::_SerializeRow(     const ROW&amp; row, const til::CoordType startX,     const til::CoordType endX, const bool addLineBreak,     const bool isLastRow, std::wstring&amp; buffer,     std::optional&lt;TextAttribute&gt;&amp; previousTextAttr, bool&amp; delayedLineBreak ) const {     ....     \/\/ Handle empty rows (with no runs).     \/\/ See above for more details about `delayedLineBreak`.     if (delayedLineBreak)     {         buffer.append(L\"\\r\\n\");         delayedLineBreak = false;     }      delayedLineBreak = !row.WasWrapForced() &amp;&amp; addLineBreak;     .... } <\/code><\/pre>\n<p>\u041d\u0430\u043f\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>delayedLineBreak<\/code>, \u0432\u0435\u0434\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0435\u0433\u043e \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442. <a href=\"https:\/\/github.com\/microsoft\/terminal\/pull\/17059\/files#diff-8ebb67a9f44b797a1ed5e3336e286ff9e8c7338922d0da9e8b27b53eb748ff09R2696\" rel=\"noopener noreferrer nofollow\">\u041d\u0430 \u0440\u0435\u0432\u044c\u044e \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u044f\u0432\u0438\u043b\u0438.<\/a> \u0414\u0430\u0436\u0435 \u043d\u0430\u043c\u0451\u0442\u0430\u043d\u043d\u044b\u0439 \u0433\u043b\u0430\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 &#171;\u0437\u0430\u043c\u044b\u043b\u0438\u0442\u044c\u0441\u044f&#187; \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0443\u044e \u043c\u0435\u043b\u043e\u0447\u044c, \u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u044c \u043d\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u0430. PVS-Studio \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u0434, \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 pull request&#8217;\u044b, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 Windows Terminal \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043e\u0442\u0445\u043e\u0434\u044f \u043e\u0442 \u043a\u0430\u0441\u0441\u044b \u2014 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/1264\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u044f\u043c\u043e \u0447\u0435\u0440\u0435\u0437 GitHub Actions<\/a>!<\/p>\n<h3>C \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0435 \u0432\u044b\u043a\u0438\u043d\u0435\u0448\u044c<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v668\/\" rel=\"noopener noreferrer nofollow\">V668<\/a> [CERT-MEM52-CPP] There is no sense in testing the &#8216;pszTranslatedConsoleTitle&#8217; pointer against null, as the memory was allocated using the &#8216;new&#8217; operator. The exception will be generated in the case of memory allocation error. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/srvinit.cpp#L657\" rel=\"noopener noreferrer nofollow\">srvinit.cpp 657<\/a><\/p>\n<pre><code class=\"cpp\">PWSTR TranslateConsoleTitle(_In_ PCWSTR pwszConsoleTitle,                             const BOOL fUnexpand,                             const BOOL fSubstitute) {   ....   LPWSTR pszTranslatedConsoleTitle;   const auto cbTranslatedConsoleTitle = cbSystemRoot + cbConsoleTitle;   Tmp = pszTranslatedConsoleTitle = (PWSTR)new BYTE[cbTranslatedConsoleTitle];   if (pszTranslatedConsoleTitle == nullptr)   {       return nullptr;   }   .... } <\/code><\/pre>\n<p>\u0427\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0435\u0440\u043a C-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432 C++. \u0421\u0438\u043b\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0438 \u0432\u0437\u044f\u043b\u0430 \u0432\u0435\u0440\u0445 \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043f\u0430\u043b\u044c\u0446\u044b \u0440\u0443\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u2014 \u0432\u0434\u0440\u0443\u0433 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/new\/operator_new.html\" rel=\"noopener noreferrer nofollow\"><code>new[]<\/code><\/a>, \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0443\u0434\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u0434\u043e \u043b\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>try<\/code>&#8212;<code>catch<\/code>.<\/p>\n<pre><code class=\"cpp\">try {     Tmp = pszTranslatedConsoleTitle = (PWSTR)new BYTE[cbTranslatedConsoleTitle]; } catch (std::bad_alloc) {     return nullptr; } <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442, \u0443\u0432\u044b, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0436\u0434\u0451\u0442 <em>exitus letalis<\/em>, \u0435\u0441\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c.<\/p>\n<h4>\u0416\u0438\u0442\u044c \u0431\u0443\u0434\u0435\u0442?<\/h4>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0438 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e! \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430\u0432\u0435\u0432\u0430\u0435\u0442 \u0434\u0440\u0430\u043c\u0443. \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u0431\u044b\u043b\u0438 \u0431\u044b \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435, \u043a\u0430\u043a \u043e\u043d, \u043f\u0440\u043e\u0435\u043a\u0442 Windows Terminal \u0437\u0430\u043a\u0440\u044b\u043b\u0438 \u0431\u044b, \u0438 Microsoft \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0431\u044b \u0434\u0430\u043b\u044c\u0448\u0435 \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c. \u041e\u043d \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0436\u0438\u043b, \u043e\u043d \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043d\u044f\u043b \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f\u0441\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Windows 11.<\/p>\n<p>\u0423 \u043e\u0434\u043d\u0438\u0445 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Windows \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0441\u0442\u043e\u0440\u0433, \u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u2014 \u043d\u0430\u0441\u0442\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0443 \u0442\u0440\u0435\u0442\u044c\u0438\u0445 \u2014 \u0438\u043d\u0442\u0435\u0440\u0435\u0441. \u041d\u0443 \u0430 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e \u0437\u0430 \u0436\u0438\u0437\u043d\u044c\u044e&#8230; \u0431\u0430\u0433\u043e\u0432. PVS-Studio \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u2014 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0440\u0435\u043c\u044f \u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u044b, \u0438 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0432\u044b \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043c\u043e\u0449\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/order\/open-source-license\/\" rel=\"noopener noreferrer nofollow\">OSS-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/a> \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<p>\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: Taras Shevchenko. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1267\/\" rel=\"noopener noreferrer nofollow\">Windows Terminal proves to be terminal?<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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\/ru\/articles\/931576\/\"> https:\/\/habr.com\/ru\/articles\/931576\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443? \u042d\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u0430\u0441\u0442 \u0441\u0432\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0438 \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438 Microsoft, \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0432 Windows Terminal?<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>Windows Terminal \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0430 &#171;\u0423\u0437\u0435\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Windows&#187; \u0432 Windows 11 Sun Valley 2 (\u0432\u0435\u0440\u0441\u0438\u044f 22H2). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Windows, \u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u0440\u0448\u0435 Windows 10 May 2020 Update (\u0432\u0435\u0440\u0441\u0438\u044f 2004). \u041f\u0435\u0440\u0432\u043e\u0435 \u0431\u0440\u043e\u0441\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043a\u043b\u0430\u0434\u043e\u043a \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0448\u0440\u0438\u0444\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, Cascadia Mono. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Visual Studio Code \u0438 Visual Studio 2022.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e \u0437\u0430\u043c\u0435\u043d\u0435 \u0441\u043e\u0431\u043e\u0439 <code>conhost.exe<\/code> \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043c\u0435\u043b\u044b\u043c \u0441 \u043c\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. Windows Terminal &#171;\u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442&#187; \u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u041a\u0438\u0431\u0435\u0440\u043b\u044e\u0434\u044f\u043c (\u0438\u043b\u0438 \u0430\u0441\u0441\u0438\u043c\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u0411\u043e\u0440\u0433\u0438, \u0435\u0441\u043b\u0438 \u0443\u0433\u043e\u0434\u043d\u043e), \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0432\u043d\u0435\u0448\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 Direct3D \u0438 Quake-\u0440\u0435\u0436\u0438\u043c\u043e\u043c \u043d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/main\/src\/host\/sources.inc\" rel=\"noopener noreferrer nofollow\">\u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c<\/a> \u0436\u0435\u043b\u0435\u0437\u043e\u0431\u0435\u0442\u043e\u043d\u043d\u044b\u043c &#171;\u043b\u0435\u0433\u0430\u0441\u0438&#187;. \u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440 ReactOS \u0438 \u0431\u043e\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443, \u0442\u043e \u0443\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u043f\u043e \u043d\u0435\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <strong>\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0435\u043d<\/strong> \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0433\u043b\u0430\u0437 \u2014 \u0443\u0437\u0435\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Windows \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT, \u0438 \u0442\u043e\u043c\u0443 <a href=\"https:\/\/git.reactos.org\/?p=reactos.git&amp;a=search&amp;h=HEAD&amp;st=commit&amp;s=microsoft%2Fterminal\" rel=\"noopener noreferrer nofollow\">\u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435<\/a>.<\/p>\n<p>\u0423\u0441\u0430\u0436\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043f\u0435\u0440\u0435\u0434 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u043e\u043c \u0441 \u0432\u0430\u0448\u0438\u043c \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c (\u0430 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0447\u0438\u0442\u0430\u0435\u0442\u0435?), PVS-Studio \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PVS-Studio<\/h4>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u043c\u043e\u0436\u043d\u043e \u0441 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/download\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1267\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/a>. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1267\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u0441 \u0434\u043e\u043b\u0433\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0443\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u0438 \u043c\u044b\u0448\u0438. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0437\u0430\u0439\u043c\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Visual Studio 2022. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f PVS-Studio \u2014 7.37.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043d\u0435 \u0437\u0430\u0437\u043e\u0440\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c PVS-Studio \u0432 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0025\/\" rel=\"noopener noreferrer nofollow\">\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \ud83d\ude42<\/p>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/microsoft\/terminal\/tree\/fc0a06c3b6cae2ede1326eef202a800244365ebd\" rel=\"noopener noreferrer nofollow\">fc0a06c<\/a> \u0432 &#171;\u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439&#187; (Release) \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1246\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 CPython<\/a> \u0442\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u043e \u043c\u043d\u0435 \u0440\u0430\u0437\u0433\u043e\u0440\u0435\u043b\u0441\u044f \u0430\u0437\u0430\u0440\u0442, \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u043b\u0438, \u043a\u0430\u043a \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b Fenris \u0438\u0437 Steel Hunters: &#171;\u042f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0433\u043e\u043b\u043e\u0434\u0435\u043d&#8230; \u043f\u0440\u0438\u0432\u0435\u0434\u0438 \u043c\u043d\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e&#187;.<\/p>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u2014 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>PVS-Studio_Cmd.exe<\/code> \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Visual Studio 2022.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b WinGet, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <a href=\"https:\/\/github.com\/microsoft\/terminal\/tree\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/.config\" rel=\"noopener noreferrer nofollow\"><code>.config<\/code><\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439 Community, \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0432 <code>README.md<\/code> \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre><code>winget configure .config\\configuration.winget <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Visual Studio, \u0442\u043e \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u043e\u043a\u043d\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0432\u0430\u0448 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 Visual Studio \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/1243\/\" rel=\"noopener noreferrer nofollow\">PowerShell 7<\/a> \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445.<\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<p>\u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 Windows Terminal \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u044b NuGet, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <em>vcpkg<\/em> \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0441 \u0433\u043b\u0430\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043b\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0444\u0430\u0439\u043b\u044b, \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c\u0438 \u043c\u0430\u0441\u043a\u0430\u043c\u0438 \u043f\u0443\u0442\u0435\u0439:<\/p>\n<pre><code>\\terminal\\oss\\ \\terminal\\obj\\*\\vcpkg\\ \\terminal\\packages\\Microsoft.Windows.ImplementationLibrary*\\ \\Generated Files\\ <\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 PVS-Studio_Cmd, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>.pvsconfig<\/code> \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>\/\/V_EXCLUDE_PATH<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>wt.pvsconfig<\/code>. \u041e\u043d \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043f\u0430\u043f\u043a\u0435 <code>terminal<\/code>, \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Windows Terminal.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Visual Studio 2022 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443: <strong>Extensions &gt; PVS-Studio &gt; Options &gt; Don&#8217;t Check Files<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e <strong>PathMasks<\/strong> \u0438\u043b\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>wt.pvsconfig<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>Shift+Alt+A<\/strong>), \u0438 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u042f \u0431\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043d\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6630\/#exclude_path\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043c\u0435\u043d\u044f \ud83d\ude42<\/p>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437. \u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <code>PVS-Studio_Cmd.exe<\/code> \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 MSBuild \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>PVS-Studio_Cmd.exe -t D:\\Git\\terminal\\OpenConsole.sln ^                    -c Release -p x64 ^                    -C D:\\Git\\terminal\\wt.pvsconfig <\/code><\/pre>\n<p>\u0410 \u0438\u0437 Visual Studio \u2014 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u043e \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 <code>PVS-Studio_Cmd.exe<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0451\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>.plog<\/code> \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-t<\/code>. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0447\u0451\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-o<\/code>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 <code>.plog<\/code> \u0438 <code>.json<\/code>. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0442\u0447\u0451\u0442\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0038\/\" rel=\"noopener noreferrer nofollow\">\u0432 \u043d\u0430\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u041f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Visual Studio \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430.<\/p>\n<h3>\u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e, C#<\/h3>\n<p>\u042f \u0437\u0430\u0431\u044b\u043b \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0432\u0443\u044f\u0437\u044b\u0447\u043d\u044b\u0439, \u0438 \u0437\u0434\u0435\u0441\u044c <em>\u0447\u0438\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e<\/em> \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430. WinUI 3 \u2014 \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u0435\u0434\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u043e\u043a\u0440\u0443\u0433 \u0447\u0451\u0440\u043d\u043e\u0439 \u043f\u0435\u043b\u0435\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430 \u043d\u0451\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b \u2014 \u043c\u043e\u044f \u0441\u043e\u0432\u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0442\u0430. \u041c\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u0432 C++. \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043d\u044b\u0435, \u0438 \u0438\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041e\u0431\u0435\u0449\u0430\u044e!<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u0432\u043e\u0439\u043a\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 PVS-Studio, \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f N1:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3061\/\" rel=\"noopener noreferrer nofollow\">V3061<\/a> Parameter &#8216;sbiexOriginal&#8217; is always rewritten in method body before being used. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L404\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 404<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3061\/\" rel=\"noopener noreferrer nofollow\">V3061<\/a> Parameter &#8216;sbiex&#8217; is always rewritten in method body before being used. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L409\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 409<\/a><\/p>\n<pre><code class=\"cs\">private void TestScrollByOverflowImpl(     CmdApp app, ViewportArea area, IntPtr hConsole,     WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiex,     Queue&lt;EventData&gt; expected,     WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiexOriginal ) {     \/\/ Get original screen information     sbiexOriginal = app.GetScreenBufferInfo();                  \/\/ &lt;=     short promptLineEnd = sbiexOriginal.dwCursorPosition.X;     promptLineEnd--; \/\/ prompt line ended one position left of cursor      \/\/ Resize the window to only have two lines left at the bottom     \/\/ to test overflow when we echo some text     sbiex = sbiexOriginal;                                      \/\/ &lt;=     .... } <\/code><\/pre>\n<p>\u0418\u043d\u0446\u0438\u0434\u0435\u043d\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0432 <strong>\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c<\/strong> unit-\u0442\u0435\u0441\u0442\u0435. \u042d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e\u043a\u0440\u044b\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c <a href=\"https:\/\/github.com\/microsoft\/terminal\/issues\/7282\" rel=\"noopener noreferrer nofollow\">issue<\/a> \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.  \u0410\u0432\u0442\u043e\u0440 \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u043e\u043d &#171;\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0442\u0435\u0441\u0442\u044b, \u0438\u0445 \u043d\u0430\u0434\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443&#187;. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u044f \u0438\u043c \u0434\u0430\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u043d\u043e \u043d\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u043e\u0442 PVS-Studio, \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f N2:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3115\/\" rel=\"noopener noreferrer nofollow\">V3115<\/a> Passing &#8216;null&#8217; to &#8216;Equals&#8217; method should not result in &#8216;NullReferenceException&#8217;. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/host\/ft_uia\/WinEventTests.cs#L65\" rel=\"noopener noreferrer nofollow\">WinEventTests.cs 65<\/a><\/p>\n<pre><code class=\"cs\">public override bool Equals(object obj) {     if (typeof(EventData) == obj.GetType())     {         return Equals((EventData)obj);     }     else     {         return base.Equals(obj);     } } <\/code><\/pre>\n<p><code>obj<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0435\u043c \u0443\u0433\u043e\u0434\u043d\u043e, \u0438 \u0434\u0430\u0436\u0435 <code>null<\/code>. \u0418 \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 <code>null<\/code>, \u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0451\u043c \u0432 \u0432\u0435\u0442\u043a\u0443 <code>else<\/code>, \u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c <s>\u0442\u043e\u0440\u0442<\/s> NRE \u0432 \u043b\u0438\u0446\u043e. \u0418\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cs\">if (obj == null)     return false;  if (typeof(EventData) == obj.GetType()) {     return Equals((EventData)obj); } <\/code><\/pre>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f N3:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3137\/\" rel=\"noopener noreferrer nofollow\">V3137<\/a> The &#8216;fSuccess&#8217; variable is assigned but is not used by the end of the function. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/tools\/vtapp\/Program2.cs#L80\" rel=\"noopener noreferrer nofollow\">Program2.cs 80<\/a><\/p>\n<pre><code class=\"cs\">public static void enableVT() {     IntPtr hCon = Pinvoke.GetStdHandle(Pinvoke.STD_OUTPUT_HANDLE);      int mode;     bool fSuccess = Pinvoke.GetConsoleMode(hCon, out mode);      if (fSuccess)     {         mode |= Pinvoke.ENABLE_VIRTUAL_TERMINAL_PROCESSING;         fSuccess = Pinvoke.SetConsoleMode(hCon, mode);           \/\/ &lt;=     } } <\/code><\/pre>\n<p>\u0418 \u043a \u043d\u0435\u043c\u0443 \u0432 \u043f\u0440\u0438\u0434\u0430\u0447\u0443 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/tools\/vtapp\/Program2.cs#L92\" rel=\"noopener noreferrer nofollow\"><code>disableVT()<\/code><\/a> \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c, \u043d\u0435 \u0438\u043d\u0430\u0447\u0435 \u043a\u0430\u043a &#171;\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430&#187;:<\/p>\n<ul>\n<li>\n<p>V3137 The &#8216;fSuccess&#8217; variable is assigned but is not used by the end of the function. Program2.cs 92<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/windows\/console\/setconsolemode\" rel=\"noopener noreferrer nofollow\"><code>SetConsoleMode<\/code><\/a> \u0438\u0437 Windows API \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043d\u043e \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438, \u043b\u0438\u0431\u043e&#8230; \u044d\u0442\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0441 \u0432\u044b\u0437\u043e\u0432\u0430 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/windows\/console\/getconsolemode\" rel=\"noopener noreferrer nofollow\"><code>GetConsoleMode<\/code><\/a>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 <code>bool<\/code>, \u0443 \u043e\u0431\u0435\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Windows \u0438 Windows 10 Threshold 1 (\u0432\u0435\u0440\u0441\u0438\u044f 1507), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/console\/console-virtual-terminal-sequences\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 VT100 \u0438 \u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445<\/a>.<\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b UB\u0438\u0432\u0430\u044e\u0442<\/h3>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f, \u0430 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u044f \u043e\u0431\u0435\u0449\u0430\u043b, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c\u0443. \u041d\u0435 \u0441\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u2014 \u043b\u0435\u0442\u0438\u043c \u043f\u0440\u044f\u043c\u043e\u0439 \u043d\u0430\u0432\u043e\u0434\u043a\u043e\u0439 \u0432 C++!<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v783\/\" rel=\"noopener noreferrer nofollow\">V783<\/a> [CERT-CTR51-CPP] Dereferencing of the invalid iterator &#8216;shades.end()&#8217; might take place. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/cascadia\/TerminalApp\/ColorHelper.cpp#L194\" rel=\"noopener noreferrer nofollow\">ColorHelper.cpp 194<\/a><\/p>\n<pre><code class=\"cpp\">winrt::Windows::UI::Color ColorHelper::GetAccentColor(     const winrt::Windows::UI::Color&amp; color ) {     ....     auto shades = std::map&lt;float, HSL&gt;();     ....      \/\/ 3f is quite nice if the whole non-client area is painted     constexpr auto readability = 1.75f;     for (auto shade : shades)     {         if (shade.first &gt;= readability)         {             return HslToRgb(shade.second);         }     }     return HslToRgb(shades.end()-&gt;second);    \/\/ &lt;= } <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043b\u0438, \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u0438\u043d \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438? \u0422\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0430. \u0417\u0434\u0435\u0441\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e <em>\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f<\/em> <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/terms\/0066\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a>, \u0438 \u043f\u0441\u0438\u0445\u043e\u0431\u0443\u043c\u0430\u0433\u0443 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <code>std::map::end()<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0432 <code>std::map<\/code>.<\/p>\n<h3>\u0422\u0435\u043b\u0435\u043f\u0430\u0442\u044b \u0432 \u043e\u0442\u043f\u0443\u0441\u043a\u0435<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1004\/\" rel=\"noopener noreferrer nofollow\">V1004<\/a> [CERT-EXP34-C] The &#8216;pSettings&#8217; pointer was used unsafely after it was verified against nullptr. Check lines: 199, 211. <a href=\"https:\/\/github.com\/microsoft\/terminal\/blob\/fc0a06c3b6cae2ede1326eef202a800244365ebd\/src\/interactivity\/win32\/window.cpp#L211\" rel=\"noopener noreferrer nofollow\">window.cpp 211<\/a><\/p>\n<pre><code class=\"cpp\">[[nodiscard]] NTSTATUS Window::_MakeWindow(     _In_ Settings* const pSettings,     _In_ SCREEN_INFORMATION* const pScreen ) {     auto&amp; g = ServiceLocator::LocateGlobals();     auto&amp; gci =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-468808","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468808","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=468808"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468808\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}