{"id":352833,"date":"2023-05-15T04:00:00","date_gmt":"2023-05-15T03:00:00","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=qodana&#038;p=352833"},"modified":"2023-05-15T04:00:03","modified_gmt":"2023-05-15T03:00:03","slug":"qodana-2023-1-kotlin-js-ir-go-30","status":"publish","type":"qodana","link":"https:\/\/blog.jetbrains.com\/zh-hans\/qodana\/2023\/05\/qodana-2023-1-kotlin-js-ir-go-30\/","title":{"rendered":"Qodana 2023.1\uff1a\u7075\u6d3b\u7684\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e\uff0c\u652f\u6301\u8fc1\u79fb\u5230 Kotlin\/JS IR \u7f16\u8bd1\u5668\uff0c\u68c0\u67e5 Go \u7684\u8bb8\u53ef\u517c\u5bb9\u6027\uff0c\u63d2\u4ef6\u96c6\u6210\uff0c\u4ee5\u53ca 30 \u591a\u9879\u65b0\u68c0\u67e5"},"content":{"rendered":"<p><em>Qodana \u662f JetBrains \u5f00\u53d1\u7684\u667a\u80fd\u4ee3\u7801\u8d28\u91cf\u5e73\u53f0\uff0c\u76ee\u524d\u5904\u4e8e\u9884\u89c8\u9636\u6bb5\u3002 \u8fd9\u6b3e\u5f3a\u5927\u7684\u9759\u6001\u5206\u6790\u5f15\u64ce\u53ef\u4ee5\u5c06\u68c0\u67e5\u4ece JetBrains IDE \u5e26\u5230\u4efb\u4f55 CI \u7ba1\u9053\uff0c\u5728 CI \u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u8d44\u6e90\u5bc6\u96c6\u578b\u68c0\u67e5\uff0c\u4e3a\u60a8\u8282\u7701\u65f6\u95f4\u548c\u8ba1\u7b97\u8d44\u6e90\u3002 \u652f\u6301 60 \u591a\u79cd\u6280\u672f\uff0c\u5206\u6790\u65e0\u9650\u884c\u6570\u7684\u4ee3\u7801\u3002<\/em><\/p>\n<p>\u65b0\u7248 Qodana \u62e5\u6709\u91cd\u8981\u7684\u589e\u5f3a\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u786e\u4fdd\u4ee3\u7801\u5177\u6709\u6700\u9ad8\u8d28\u91cf\u3002 2023.1 \u7248\u8ba9 CI \u7ba1\u9053\u7684\u9759\u6001\u5206\u6790\u6b65\u9aa4\u62e5\u6709\u66f4\u5927\u7684\u7075\u6d3b\u6027\u3002 \u6211\u4eec\u5f15\u5165\u4e86\u4e00\u79cd\u9488\u5bf9\u9879\u76ee\u626b\u63cf\u914d\u7f6e\u68c0\u67e5\u7684\u667a\u80fd\u65b9\u5f0f\uff0c\u5e76\u5b9e\u73b0\u4e86\u53ef\u80fd\u662f\u5411 Qodana \u9759\u6001\u5206\u6790\u5f15\u64ce\u6dfb\u52a0\u63d2\u4ef6\u7684\u6700\u7b80\u5355\u65b9\u5f0f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u8bf7\u7ee7\u7eed\u67e5\u770b\u91cd\u5927\u66f4\u65b0\u7684\u5b8c\u6574\u5217\u8868\uff0c\u6216\u76f4\u63a5\u8df3\u5230 linter \u7279\u5b9a\u7684\u589e\u5f3a\u529f\u80fd\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344478\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-34.png\" alt=\"\" width=\"1600\" height=\"750\" \/><\/figure>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"\u514d\u8d39\u8bd5\u7528 Qodana\" href=\"https:\/\/www.jetbrains.com.cn\/qodana\/\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"download-icon\"><\/i>\u514d\u8d39\u8bd5\u7528 Qodana<\/a><\/p>\n<h2 class=\"wp-block-heading\">\u91cd\u5927\u66f4\u65b0<\/h2>\n<h3 class=\"wp-block-heading\">\u4f7f\u7528\u65b0\u7684 YAML \u683c\u5f0f\u5b9e\u73b0\u7075\u6d3b\u7684\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e<\/h3>\n<p>\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u662f Qodana \u914d\u7f6e\u7684\u5173\u952e\u90e8\u5206\u3002 \u5b83\u4eec\u5b9a\u4e49\u4e86\u5728\u8fd0\u884c\u5206\u6790\u65f6 Qodana \u5c06\u5bf9\u4ee3\u7801\u5e94\u7528\u7684\u4e00\u7ec4\u68c0\u67e5\u3002<\/p>\n<p>\u4ece 2023.1 \u7248\u5f00\u59cb\uff0cQodana \u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684 YAML \u683c\u5f0f\u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e\u529f\u80fd\uff0c\u8fd9\u4f7f\u60a8\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u81ea\u5b9a\u4e49\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u968f\u7740\u9879\u76ee\u7684\u8fdb\u5c55\u8fdb\u884c\u8c03\u6574\u3002 \u4e0b\u9762\u662f\u7528\u4e8e\u4f18\u5316\u5206\u6790\u7684\u9009\u9879\uff1a<\/p>\n<ul>\n<li>[\u65b0] <a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/2023.1\/custom-profiles.html#groups\" target=\"_blank\" rel=\"noopener\">\u5c06\u68c0\u67e5\u5206\u7ec4<\/a>\u5e76\u7ba1\u7406\u6b64\u7c7b\u7fa4\u7ec4\u3002\u00a0<\/li>\n<li>[\u65b0] \u5305\u62ec\u73b0\u6709\u914d\u7f6e\u6587\u4ef6\u548c\u521b\u5efa\u65b0\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li>\u542f\u7528\u548c\u7981\u7528\u68c0\u67e5\u3002<\/li>\n<li>\u8bbe\u7f6e\u68c0\u67e5\u53c2\u6570\u3002<\/li>\n<li>\u914d\u7f6e\u68c0\u67e5\u8303\u56f4\u3002<\/li>\n<\/ul>\n<p>\u4f8b\u5982\uff0c\u5728\u4f7f\u7528 PHP\/\u5e38\u89c4\u68c0\u67e5\u7c7b\u522b\u68c0\u67e5\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u4ece Qodana For PHP linter \u4e2d\u6392\u9664 <code>PhpDeprecationInspection<\/code> \u68c0\u67e5\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">name: \"PHP\/General without PhpDeprecationInspection\"\ninspections:\n\u00a0\u00a0- group: \"category:PHP\/General\"\n\u00a0\u00a0\u00a0\u00a0enabled: true # Enable the 'PHP\/General' category\n\u00a0\u00a0- inspection: PhpDeprecationInspection\n\u00a0\u00a0\u00a0\u00a0enabled: false # Disable the PhpDeprecationInspection inspection<\/pre>\n<p>\u8bf7\u53c2\u9605\u6b64<a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/2023.1\/custom-profiles.html\" target=\"_blank\" rel=\"noopener\">\u6587\u6863<\/a>\uff0c\u8be6\u7ec6\u4e86\u89e3\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u3002\u00a0<\/p>\n<h3 class=\"wp-block-heading\">\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u7684\u91cd\u5927\u91cd\u6784<\/h3>\n<p>Qodana \u63d0\u4f9b\u4e24\u79cd\u7c7b\u578b\u7684\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 \u2013 <em>qodana.starter<\/em>\uff0c\u5b83\u4ec5\u7528\u4e8e\u91cd\u8981\u68c0\u67e5\uff0c\u662f\u9879\u76ee\u521d\u59cb\u626b\u63cf\u7684\u7406\u60f3\u9009\u62e9\uff0c\u4ee5\u53ca <em>qodana.recommended<\/em>\uff0c\u5b83\u4f1a\u542f\u7528\u4e00\u7ec4\u5e7f\u6cdb\u9002\u7528\u4e8e\u5927\u591a\u6570\u9879\u76ee\u7684\u9884\u5148\u9009\u62e9\u7684\u68c0\u67e5\u3002<\/p>\n<p>\u6211\u4eec\u91cd\u5199\u4e86\u8fd9\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u4f7f\u5b83\u4eec\u4e0e IDE \u4e2d\u63d0\u4f9b\u7684<em>\u9ed8\u8ba4<\/em>\u914d\u7f6e\u6587\u4ef6\u4fdd\u6301\u4e00\u81f4\u3002 \u8fd9\u4e00\u53d8\u5316\u53ef\u4ee5\u8ba9\u60a8\u83b7\u5f97\u66f4\u9ad8\u7684\u900f\u660e\u5ea6\uff0c\u4f7f\u60a8\u80fd\u591f\u786e\u4fdd Qodana \u548c\u60a8\u7684 IDE \u8fd0\u884c\u7684\u68c0\u67e5\u57fa\u672c\u76f8\u540c\uff0c\u4ece\u800c\u6709\u52a9\u4e8e\u5bf9\u4ee3\u7801\u8d28\u91cf\u91c7\u7528\u66f4\u4e00\u81f4\u7684\u65b9\u5f0f\u3002\u00a0<\/p>\n<p>\u60a8\u53ef\u4ee5\u5728 <a href=\"https:\/\/github.com\/JetBrains\/qodana-profiles\/blob\/master\/.idea\/inspectionProfiles\/qodana.recommended.yaml\" target=\"_blank\" rel=\"noopener\">GitHub<\/a> \u4e2d\u627e\u5230\u66f4\u65b0\u7684 <em>qodana.recommended<\/em> \u914d\u7f6e\u6587\u4ef6\u3002 \u6b64\u914d\u7f6e\u6587\u4ef6\u4e0e<em>\u9ed8\u8ba4\u7684<\/em> IDE \u914d\u7f6e\u6587\u4ef6\u76f8\u5339\u914d\uff0c\u4f46\u6709\u51e0\u9879\u4f8b\u5916\uff1a<\/p>\n<ul>\n<li>\u5bf9\u4e8e\u66f4\u8f7b\u91cf\u7ea7\u7684\u5206\u6790\uff0c\u6240\u6709<em>\u5168\u5c40<\/em>\u68c0\u67e5\u90fd\u4f1a\u88ab\u7981\u7528\uff0c\u56e0\u4e3a\u5b83\u4eec\u53ef\u80fd\u975e\u5e38\u8017\u65f6\u3002\u00a0\u00a0<\/li>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u6392\u9664\u67d0\u4e9b\u9879\u76ee\u76ee\u5f55\uff08\u5982\u6784\u5efa\u76ee\u5f55\u548c\u6d4b\u8bd5\u6e90\uff09\uff0c\u4e0d\u5bf9\u5176\u8fdb\u884c\u5206\u6790\u3002<\/li>\n<\/ul>\n<p>\u60a8\u4e5f\u53ef\u4ee5\u5728 <a href=\"https:\/\/github.com\/JetBrains\/qodana-profiles\/blob\/master\/.idea\/inspectionProfiles\/qodana.starter.yaml\" target=\"_blank\" rel=\"noopener\">GitHub<\/a> \u4e2d\u627e\u5230\u66f4\u65b0\u7684 <em>qodana.starter<\/em> \u914d\u7f6e\u6587\u4ef6\u3002 \u6b64\u914d\u7f6e\u6587\u4ef6\u6d3e\u751f\u81ea <em>qodana.recommended<\/em> \u914d\u7f6e\u6587\u4ef6\uff0c\u4ec5\u6267\u884c\u91cd\u8981\u68c0\u67e5\u3002 \u4ee5\u4e0b\u662f\u6211\u4eec\u505a\u51fa\u7684\u4e3b\u8981\u66f4\u6539\uff1a<\/p>\n<ul>\n<li>\u7981\u7528\u4e86<em>\u4ee3\u7801\u6837\u5f0f<\/em>\u548c<em>\u4ee3\u7801\u7ea6\u5b9a<\/em>\u8bed\u4e49\u68c0\u67e5\u3002\u00a0<\/li>\n<li>\u7981\u7528\u4e86\u5bf9\u4ee3\u7801\u5e93\u4e2d\u4e0d\u53ef\u6267\u884c\u90e8\u5206\uff08\u4f8b\u5982 Javadocs\uff09\u7684\u68c0\u67e5\u3002<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\">\u8f7b\u677e\u5730\u5411 Qodana \u6dfb\u52a0\u63d2\u4ef6<\/h3>\n<p>\u5982\u679c\u60f3\u8981\u6269\u5c55 Qodana \u5e76<a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/2023.1\/qodana-yaml.html#Manage+plugins\" target=\"_blank\" rel=\"noopener\">\u4f7f\u7528 JetBrains Marketplace \u4e2d\u7684\u68c0\u67e5\u63d2\u4ef6<\/a>\uff0c\u53ea\u9700\u5c06\u5176 ID \u6dfb\u52a0\u5230 <code>qodana.yaml<\/code> \u6587\u4ef6\u4e2d\u5373\u53ef\u3002\u00a0<\/p>\n<p>\u5f97\u76ca\u4e8e Marketplace \u7684\u6700\u8fd1\u66f4\u65b0\uff0c\u60a8\u73b0\u5728\u53ef\u4ee5\u76f4\u63a5\u5728\u63d2\u4ef6\u9875\u9762\u4e2d\u590d\u5236\u5176 ID\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344489\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-35.png\" alt=\"\" width=\"1600\" height=\"748\" \/><\/figure>\n<p>\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u5b89\u88c5\u63d2\u4ef6\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 <code>bootstrap<\/code> \u9009\u9879\u3002<\/li>\n<li>\u5f00\u53d1\u4e00\u4e2a\u4ee5 <code>FROM jetbrains\/qodana...<\/code> \u5f00\u5934\u7684\u81ea\u5b9a\u4e49 <code>Dockerfile<\/code>\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 <a href=\"https:\/\/github.com\/jetbrains\/qodana-docker\" target=\"_blank\" rel=\"noopener\">GitHub<\/a> \u4e0a\u63d0\u4f9b\u7684 Qodana <code>Dockerfile<\/code> \u793a\u4f8b\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u60a8\u53ef\u80fd\u60f3\u8981\u4e86\u89e3\u7684\u503c\u5f97\u6ce8\u610f\u5e76\u4e14\u975e\u5e38\u53d7\u6b22\u8fce\u7684\u63d2\u4ef6\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/16136-grazie-professional\" target=\"_blank\" rel=\"noopener\">Grazie Professional<\/a>\uff0c\u5b83\u63d0\u4f9b\u4e86\u5148\u8fdb\u7684\u81ea\u7136\u8bed\u8a00\u4e66\u5199\u8f85\u52a9\u529f\u80fd\uff0c\u5305\u62ec\u62fc\u5199\u68c0\u67e5\u3001\u8bed\u6cd5\u6821\u6b63\u3001\u81ea\u7136\u8bed\u8a00\u8865\u5168\u4ee5\u53ca\u5176\u4ed6\u5bf9\u6587\u672c\u4e66\u5199\u548c\u7f16\u8f91\u6709\u7528\u7684\u5de5\u5177\u3002\u00a0<\/li>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/1065-checkstyle-idea\" target=\"_blank\" rel=\"noopener\">CheckStyle<\/a>\uff0c\u5b83\u53ef\u4ee5\u5728 IntelliJ IDEA \u4e2d\u4f7f\u7528 CheckStyle \u5bf9 Java \u6587\u4ef6\u8fdb\u884c\u5b9e\u65f6\u548c\u6309\u9700\u626b\u63cf\u3002<\/li>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/7448-zero-width-characters-locator\" target=\"_blank\" rel=\"noopener\">Zero Width Characters Locator<\/a>\uff0c\u5b83\u589e\u52a0\u4e86\u4e00\u9879\u68c0\u67e5\uff0c\u53ef\u4ee5\u9632\u6b62\u51fa\u73b0\u4e0e\u6e90\u4ee3\u7801\u548c\u8d44\u6e90\u4e2d\u4e0d\u53ef\u89c1\u7684\u96f6\u5bbd\u5ea6\u5b57\u7b26\u76f8\u5173\u7684\u4e00\u4e9b\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u00a0<\/li>\n<\/ul>\n<p>\u60a8\u53ef\u4ee5\u5728 JetBrains Marketplace \u4e2d\u901a\u8fc7<a href=\"https:\/\/plugins.jetbrains.com\/search?orderBy=downloads&amp;tags=Inspection\" target=\"_blank\" rel=\"noopener\">\u6b64\u641c\u7d22<\/a>\u627e\u5230\u66f4\u591a\u63d2\u4ef6\u3002\u00a0<\/p>\n<p>Qodana \u76ee\u524d\u4e0d\u652f\u6301\u4ed8\u8d39\u63d2\u4ef6\uff0c\u56e0\u6b64\u53ef\u80fd\u4ecd\u7136\u5b58\u5728\u4e0e\u5f53\u524d\u7248\u672c\u4e0d\u517c\u5bb9\u7684\u63d2\u4ef6\u3002 \u4eca\u5e74\uff0c\u6211\u4eec\u6253\u7b97\u4e3a JetBrains Marketplace \u4e0a\u7684 Qodana \u63d2\u4ef6\u5f15\u5165\u9002\u5f53\u7684\u517c\u5bb9\u6027\u68c0\u67e5\u3002<\/p>\n<h2 class=\"wp-block-heading\">Linter \u7279\u5b9a\u7684\u66f4\u65b0<\/h2>\n<h3 class=\"wp-block-heading\">Qodana \u4e2d\u7684\u65b0 JVM \u68c0\u67e5<\/h3>\n<h4 class=\"wp-block-heading\"><strong>\u9002\u7528\u4e8e Kotlin\/JS IR \u7f16\u8bd1\u5668\u7684\u68c0\u67e5<\/strong><\/h4>\n<p>Kotlin \u56e2\u961f\u5f15\u5165\u4e86<a href=\"https:\/\/kotlinlang.org\/docs\/js-ir-compiler.html\" target=\"_blank\" rel=\"noopener\">\u65b0\u7684 IR \u7f16\u8bd1\u5668<\/a>\uff0c\u5b83\u53ef\u4ee5\u5c06 Kotlin \u6e90\u4ee3\u7801\u8fc1\u79fb\u5230 JavaScript\u3002 \u4e3a\u4e86\u7b80\u5316\u8fc1\u79fb\u8fc7\u7a0b\u5e76\u53d1\u73b0\u6f5c\u5728\u7684\u9519\u8bef\uff0cQodana \u73b0\u5728\u652f\u6301\u4ee5\u4e0b\u68c0\u67e5\uff1a<\/p>\n<p><em>NonExternalClassifierExtendingStateOrProps<\/em><\/p>\n<p>\u4f7f\u7528\u4ece\u7eaf JS \u7c7b\u6d3e\u751f\u7684 Kotlin \u63a5\u53e3\u548c\u7c7b\uff08\u5305\u62ec\u6570\u636e\u7c7b\uff09\uff0c\u4f8b\u5982 React \u7684 <code>State<\/code> \u548c <code>Props<\/code>\uff0c\u53ef\u80fd\u5bfc\u81f4 <code>ClassCastExceptions<\/code>\u3002 \u51fa\u73b0\u6b64\u7c7b\u5f02\u5e38\u7684\u539f\u56e0\u662f\u7f16\u8bd1\u5668\u8bd5\u56fe\u5c06\u8fd9\u4e9b\u7c7b\u7684\u5b9e\u4f8b\u5f53\u4f5c Kotlin \u5bf9\u8c61\u6765\u5904\u7406\uff0c\u4f46\u5b83\u4eec\u5b9e\u9645\u4e0a\u6765\u81ea JS\u3002<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\u662f\u5c06\u6240\u6709\u6d3e\u751f\u81ea\u7eaf JS \u7c7b\u7684\u7c7b\u548c\u63a5\u53e3\u8f6c\u6362\u4e3a\u5916\u90e8\u63a5\u53e3\u3002 Qodana \u5c06\u62a5\u544a\u6269\u5c55 <code>State<\/code> \u6216 <code>Props<\/code> \u4f7f\u7528\u7684\u975e\u5916\u90e8\u5206\u7c7b\u5668\u3002\u00a0<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344580\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-40.png\" alt=\"\" width=\"1564\" height=\"390\" \/><\/figure>\n<p><em>NonVarPropertyInExternalInterface<\/em><\/p>\n<p>Kotlin\/JS \u4ee3\u7801\u4e2d\u5916\u90e8\u63a5\u53e3\u7684\u5c5e\u6027\u4e0d\u80fd\u4e3a\u53ea\u8bfb (<code>val<\/code>) \u5c5e\u6027\uff0c\u56e0\u4e3a\u53ea\u6709\u5728\u4f7f\u7528 <code>js()<\/code> \u6216 <code>jso()<\/code> \u521b\u5efa\u5bf9\u8c61\u540e\u624d\u80fd\u4e3a\u5b83\u4eec\u8d4b\u503c\u3002 \u89e3\u51b3\u529e\u6cd5\u662f\u5c06\u5916\u90e8\u63a5\u53e3\u7684\u6240\u6709\u5c5e\u6027\u8f6c\u6362\u4e3a <code>var<\/code>\u3002<\/p>\n<p>Qodana \u4f1a\u9ad8\u4eae\u663e\u793a\u4e0d\u662f <code>var<\/code> \u7684\u6240\u6709\u5c5e\u6027\uff0c\u4ee5\u4fbf\u60a8\u53ef\u4ee5\u8f6c\u6362\u5b83\u4eec\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344500\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-36.png\" alt=\"\" width=\"1566\" height=\"382\" \/><\/figure>\n<h4 class=\"wp-block-heading\"><strong>SpringTransactionalMethodCallsInspection<\/strong><\/h4>\n<p>Spring \u6846\u67b6\u8ba9\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7801\u6ce8\u89e3\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u4e8b\u52a1\u3002 \u53ea\u6709\u6807\u8bb0\u4e3a <code>`@Transaction`<\/code> \u7684\u65b9\u6cd5\u7684\u5916\u90e8\u8c03\u7528\u624d\u4f1a\u5728\u8be5\u4e8b\u52a1\u4e0b\u8fd0\u884c\uff0c\u8fd9\u610f\u5473\u7740\u81ea\u8c03\u7528\u4e0d\u4f1a\u542f\u52a8\u65b0\u7684\u4e8b\u52a1\u3002 \u901a\u8fc7\u8fd9\u9879\u65b0\u68c0\u67e5\uff0cQodana \u53ef\u4ee5\u9ad8\u4eae\u663e\u793a\u6b64\u7c7b\u60c5\u51b5\uff0c\u56e0\u4e3a\u5b83\u4eec\u4f1a\u5728\u4e8b\u52a1\u7ba1\u7406\u4e2d\u5bfc\u81f4\u9519\u8bef\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344511\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-37.png\" alt=\"\" width=\"1564\" height=\"446\" \/><\/figure>\n<h4 class=\"wp-block-heading\"><strong>JUnitMixedFramework<\/strong><\/h4>\n<p>\u5728\u4e00\u4e2a\u9879\u76ee\u4e2d\u4f7f\u7528\u591a\u4e2a\u7248\u672c\u7684 JUnit \u53ef\u80fd\u4f1a\u5bfc\u81f4\u9519\u8bef\uff0c\u56e0\u4e3a\u5f00\u53d1\u8005\u4f1a\u9519\u8bef\u5730\u5728\u4e00\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u4e2d\u6df7\u5408\u4e0d\u540c\u7684\u7248\u672c\u3002 \u4f8b\u5982\uff0c\u8003\u8651\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344522\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-38.png\" alt=\"\" width=\"1600\" height=\"357\" \/><\/figure>\n<p>\u6d4b\u8bd5\u4f7f\u7528 JUnit4 \u8fd0\u884c\uff0c\u56e0\u6b64 JUnit5 \u7684 <code>BeforeEach<\/code> \u6ce8\u89e3\u5c06\u4e0d\u88ab\u5904\u7406\uff0c\u6d4b\u8bd5\u5c06\u5931\u8d25\u5e76\u51fa\u73b0 NullPointerException\u3002\u00a0<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cQodana \u4e0d\u68c0\u67e5\u6d4b\u8bd5\u6e90\uff0c\u56e0\u6b64\u8981\u5305\u542b\u6b64\u68c0\u67e5\uff0c\u9700\u8981\u5411 <code>qodana.yaml<\/code> \u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">include:\n  - name: JUnitMixedFramework\n    paths:\n    - &lt;path-to-tests-directory&gt;<\/pre>\n<h4 class=\"wp-block-heading\"><strong>MathRoundingWithIntArgument<\/strong><\/h4>\n<p>\u6b64\u68c0\u67e5\u62a5\u544a\u4f1a\u5bf9 <code>Math<\/code> \u548c <code>StrictMath<\/code> \u7684 <code>round()<\/code>\u3001<code>ceil()<\/code>\u3001<code>floor()<\/code> \u548c <code>rint()<\/code> \u65b9\u6cd5\u7684\u8c03\u7528\u3002 \u5bf9\u6574\u6570\u8c03\u7528\u8fd9\u4e9b\u65b9\u6cd5\u662f\u591a\u4f59\u7684\uff0c\u8fd9\u8868\u660e\u51fa\u73b0\u4e86\u9519\u8bef\uff0c\u4f8b\u5982\u610f\u5916\u7684\u6574\u6570\u9664\u6cd5\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344533\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-39.png\" alt=\"\" width=\"1568\" height=\"384\" \/><\/figure>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"\u8bd5\u7528 Qodana for JVM\" href=\"https:\/\/www.jetbrains.com\/help\/qodana\/qodana-jvm.html\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"download-icon\"><\/i>\u8bd5\u7528 Qodana for JVM<\/a><\/p>\n<h3 class=\"wp-block-heading\">Go \u7684\u7b2c\u4e09\u65b9\u8bb8\u53ef\u5ba1\u6838<\/h3>\n<p>\u5982\u679c\u60a8\u4f9d\u8d56\u5f00\u6e90\u7ec4\u4ef6\u3001\u5916\u5305\u5f00\u53d1\u6216\u91cd\u590d\u4f7f\u7528 GitHub \u7b49\u670d\u52a1\u4e2d\u7684\u4ee3\u7801\uff0c\u5219\u9700\u8981\u786e\u4fdd\u4f7f\u7528\u5408\u9002\u7684\u8bb8\u53ef\u3002 \u60a8\u53ef\u80fd\u4f1a\u610f\u5916\u5730\u5c06\u5177\u6709\u53d7\u9650\u8bb8\u53ef\u7684\u5e93\u5bfc\u5165\u8f6f\u4ef6\u4ee3\u7801\u5e93\u6216\u5fd8\u8bb0\u66f4\u65b0\u8fc7\u671f\u7684\u8bb8\u53ef\u3002 \u5982\u679c\u662f\u8fd9\u6837\uff0c\u60a8\u6240\u5728\u7684\u673a\u6784\u53ef\u80fd\u4f1a\u9762\u4e34\u58f0\u8a89\u548c\u6cd5\u5f8b\u65b9\u9762\u7684\u98ce\u9669\u3002<\/p>\n<p>\u4e3a\u4e86\u5c3d\u91cf\u964d\u4f4e\u6b64\u7c7b\u98ce\u9669\uff0c\u6211\u4eec\u53bb\u5e74\u4e3a Java\u3001Kotlin\u3001PHP \u548c JavaScript <a href=\"https:\/\/blog.jetbrains.com\/qodana\/2022\/05\/keep-your-dependency-licenses-in-check\/\">\u5f15\u5165\u4e86<em>\u8bb8\u53ef\u5ba1\u6838<\/em>\u529f\u80fd<\/a>\u3002 \u5728\u6b64\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u589e\u52a0\u4e86\u5bf9 Go \u7684\u652f\u6301\u3002 Qodana \u5c06\u5217\u51fa\u6240\u5206\u6790\u4ed3\u5e93\u4e2d\u7684\u4f9d\u8d56\u9879\u8bb8\u53ef\uff0c\u5e76\u5c31\u6709\u5173\u5176\u4e0e\u9879\u76ee\u8bb8\u53ef\u517c\u5bb9\u6027\u7684\u4efb\u4f55\u95ee\u9898\u5411\u60a8\u53d1\u51fa\u8b66\u544a\uff0c\u5982\u4e0b\u4f8b\u6240\u793a\uff1a<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344746\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-42.png\" alt=\"\" width=\"1524\" height=\"382\" \/><\/figure>\n<p>\u4e0b\u9762\u662f\u4f9d\u8d56\u9879\u8bb8\u53ef\u5217\u8868\u793a\u4f8b\uff1a<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-344735\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/04\/image-41.png\" alt=\"\" width=\"1600\" height=\"1113\" \/><\/figure>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"\u8bd5\u7528 Qodana for Go\" href=\"https:\/\/www.jetbrains.com\/help\/qodana\/qodana-go.html\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"download-icon\"><\/i>\u8bd5\u7528 Qodana for Go<\/a><\/p>\n<h3 class=\"wp-block-heading\">\u9488\u5bf9 .NET \u7684\u66f4\u65b0<\/h3>\n<h4 class=\"wp-block-heading\"><strong>\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u73b0\u5728\u4f1a\u9075\u5faa\u4ed3\u5e93\u8bbe\u7f6e<\/strong><\/h4>\n<p>\u4ee5\u524d\uff0c.NET linter \u7684\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u68c0\u67e5\u4e25\u91cd\u6027\u8bbe\u7f6e\u57fa\u4e8e\u4ece ReSharper \u83b7\u5f97\u7684\u9ed8\u8ba4\u503c\u3002 \u4f46\u662f\uff0c\u5f53\u67d0\u4e2a\u9879\u76ee\u5df2\u4f7f\u7528 ReSharper \u548c Rider \u7684\u89e3\u51b3\u65b9\u6848\u548c\u9879\u76ee\u914d\u7f6e\u5c42\u4ee5\u53ca\u5b58\u50a8\u5728\u4ed3\u5e93\u4e2d\u7684 <code>.editorconfig<\/code> \u6587\u4ef6\u65f6\uff0c\u8fd9\u79cd\u65b9\u5f0f\u4f1a\u5bfc\u81f4\u91cd\u590d\u8bbe\u7f6e\u3002 \u8fd9\u610f\u5473\u7740\u5982\u679c\u60a8\u5bf9\u5176\u4e2d\u4efb\u610f\u5c42\u8fdb\u884c\u66f4\u6539\uff0c\u5c31\u5fc5\u987b\u5728 Qodana YAML \u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u76f8\u540c\u7684\u66f4\u6539\u3002\u00a0<\/p>\n<p>\u5982\u679c\u4ed3\u5e93\u4e2d\u63d0\u4f9b\uff0c\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u73b0\u5728\u4f1a\u81ea\u52a8\u7ee7\u627f ReSharper \u548c <code>.editorconfig<\/code> \u6587\u4ef6\u4e2d\u7684\u8bbe\u7f6e\u3002 \u4e0d\u518d\u9700\u8981\u52a8\u624b\u5b8c\u6210\u4efb\u4f55\u5de5\u4f5c\uff01\u00a0<\/p>\n<h4 class=\"wp-block-heading\"><strong>Qodana YAML \u914d\u7f6e\u8bbe\u7f6e\u90e8\u5206\u73b0\u5df2\u66f4\u540d<\/strong><\/h4>\n<p><code>qodana.yaml<\/code> \u914d\u7f6e\u6587\u4ef6\u4ee5\u524d\u5305\u542b <em>dot-net<\/em> \u90e8\u5206\uff0c\u8ba9\u60a8\u53ef\u4ee5\u6307\u5b9a\u8981\u6253\u5f00\u7684\u89e3\u51b3\u65b9\u6848\u6216\u9879\u76ee\uff0c\u4ee5\u53ca\u914d\u7f6e\u548c\u5e73\u53f0\u9009\u9879\u3002 \u6b64\u90e8\u5206\u73b0\u5df2\u66f4\u540d\u4e3a <em>dotnet<\/em>\uff0c\u4ece Qodana 2023.2 \u7248\u5f00\u59cb\uff0c\u5c06\u5f03\u7528 <em>dot-net<\/em> \u540d\u79f0\u3002<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"\u8bd5\u7528 Qodana for .NET\" href=\"https:\/\/www.jetbrains.com\/help\/qodana\/qodana-dotnet.html\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"download-icon\"><\/i>\u8bd5\u7528 Qodana for .NET<\/a><\/p>\n<h2 class=\"wp-block-heading\">\u5982\u4f55\u5347\u7ea7\u5230 Qodana 2023.1<\/h2>\n<p>\u5982\u679c\u4f7f\u7528 <code>latest<\/code> Docker \u6807\u8bb0\u8fd0\u884c Qodana\uff0c\u5219\u65e0\u9700\u8fdb\u884c\u4efb\u4f55\u66f4\u6539\u3002 \u5982\u679c\u4e0d\u662f\uff0c\u8bf7\u5728\u8981\u4f7f\u7528 Qodana \u7684 CI \u5de5\u4f5c\u6d41\u4e2d\u66f4\u65b0\u5230 2023.1 \u7248\u3002 \u53ef\u4ee5\u5728\u6211\u4eec\u7684<a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/ci.html\" target=\"_blank\" rel=\"noopener\">\u6587\u6863<\/a>\u4e2d\u8be6\u7ec6\u4e86\u89e3\u73b0\u6709\u7684 CI \u96c6\u6210\u3002\u00a0\u00a0\u00a0<\/p>\n<p>\u5e76\u975e\u6240\u6709\u68c0\u67e5\u90fd\u4f1a\u81ea\u52a8\u542f\u7528\u3002 \u8981\u5728\u5206\u6790\u4e2d\u6392\u9664\u6216\u5305\u62ec\u7279\u5b9a\u68c0\u67e5\uff0c\u53ef\u80fd\u9700\u8981\u81ea\u5b9a\u4e49\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u8fd9\u5c31\u662f Qodana 2023.1 \u7684\u4eae\u70b9\uff01 \u6709\u5173\u8be6\u60c5\uff0c\u8bf7\u67e5\u770b<a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/2023.1\/new-in-2023-1.html\" target=\"_blank\" rel=\"noopener\">\u7248\u672c\u8bf4\u660e<\/a>\u3002 \u6211\u4eec\u5e0c\u671b\u60a8\u559c\u6b22\u8fd9\u4e2a\u65b0\u7248\u672c\u3002 \u5982\u679c\u60a8\u5bf9\u672a\u6765\u7684\u535a\u5ba2\u4e3b\u9898\u6709\u5efa\u8bae\uff0c\u6216\u8005\u60f3\u8be6\u7ec6\u4e86\u89e3 Qodana \u53ef\u4ee5\u5982\u4f55\u5e2e\u52a9\u60a8\u548c\u60a8\u7684\u4e1a\u52a1\uff0c\u8bf7\u5728\u6b64\u5904\u53d1\u8868\u8bc4\u8bba\uff0c\u5728 <a href=\"https:\/\/twitter.com\/Qodana\" target=\"_blank\" rel=\"noopener\">Twitter<\/a> \u4e0a\u63d0\u53ca\u6211\u4eec\uff0c\u6216\u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u81f3 <a href=\"mailto:qodana-support@jetbrains.com\">qodana-support@jetbrains.com<\/a> \u4e0e\u6211\u4eec\u8054\u7cfb\u3002<\/p>\n<p>\u795d\u60a8\u5f00\u53d1\u6109\u5feb\u5e76\u8f7b\u677e\u4fdd\u6301\u4ee3\u7801\u6574\u6d01\uff01<\/p>\n<p>\u60a8\u7684 Qodana \u56e2\u961f<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"\u53d1\u5e03\u8ba9\u60a8\u611f\u5230\u81ea\u8c6a\u7684\u4ee3\u7801\" href=\"https:\/\/www.jetbrains.com.cn\/qodana\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"download-icon\"><\/i>\u53d1\u5e03\u8ba9\u60a8\u611f\u5230\u81ea\u8c6a\u7684\u4ee3\u7801<\/a><\/p>\n<p align=\"center\">\u00a0<\/p>\n<p style=\"text-align: left\" align=\"center\">\u672c\u535a\u6587\u82f1\u6587\u539f\u4f5c\u8005\uff1a<\/p>\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1297,"featured_media":344563,"comment_status":"closed","ping_status":"closed","template":"","categories":[4089,947,286,89,907],"tags":[158,600,4197,5701,40,155,21,76,477,1978],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/qodana\/352833"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/qodana"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/qodana"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1297"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=352833"}],"version-history":[{"count":5,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/qodana\/352833\/revisions"}],"predecessor-version":[{"id":354008,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/qodana\/352833\/revisions\/354008"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/344563"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=352833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=352833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=352833"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=352833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}