简体   繁体   English

在VSCode中使用SonarLint时,如何生成本地项目违规报告?

[英]When using SonarLint in VSCode, how do you generate a report of local project violations?

I just installed the SonarLint extension for VSCode (Windows 10).我刚刚为 VSCode (Windows 10) 安装了 SonarLint 扩展。 When using my Java/Maven project, how do I generate a report of all violations in my project?使用我的 Java/Maven 项目时,如何生成项目中所有违规行为的报告? When I expand the "Sonar Lint Iusse List" on the left, there are no issues reported (even though I know, using Eclipse, that there are many SonarLint issues), only this当我展开左侧的“Sonar Lint Iusse List”时,没有报告任何问题(即使我知道,使用 Eclipse,有很多 SonarLint 问题),只有这个

在此处输入图像描述

but I'm unclear what "Show All Locations Code Action" means.但我不清楚“显示所有位置代码操作”是什么意思。

Code Action 代码动作

Warnings and Errors can provide Code Actions (also known as Quick Fixes) to help fix issues.警告和错误可以提供代码操作(也称为快速修复)来帮助解决问题。 These will be displayed in the editor in the left margin as a lightbulb.这些将作为灯泡显示在编辑器的左边距中。 Clicking on the lightbulb will either display the Code Action options or perform the action.单击灯泡将显示代码操作选项或执行操作。

On your code editing page, find where there are errors or warnings, and click the yellow light bulb to expand the Code Action menu.在您的代码编辑页面上,找到有错误或警告的地方,然后单击黄色灯泡以展开“代码操作”菜单。

在此处输入图像描述

Open this menu in a place where SonarLint issue exists, there should be Show all locations option, just click it.在存在SonarLint 问题的地方打开此菜单,应该有Show all locations选项,只需单击它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 SonarLint 与 VSCode 一起使用。 如何更改 Jave 使用的正则表达式规则 S116? - Using SonarLint with VSCode. How can I change the regex rule S116 for Jave uses? 与 SonarLint Intellij 集成后从 SonarQube 生成代码分析报告 - Generate Code Analysis Report from SonarQube after Integrating with SonarLint Intellij 如何使用ImageIO.read()打开本地项目图像? - How do you open local project images with ImageIO.read()? 与Moemoize一起使用的针对番石榴供应商的Sonarlint违规行为 - Sonarlint Violations for Guava Suppliers used with Memoize 您如何使用 Intellij“Mavenize”一个项目? - How do you "Mavenize" a project using Intellij? 使用Maven生成网站时,如何将XHTML嵌入到APT文件中? - How do you embed XHTML into APT file when using Maven to generate a site? 如何使用Gradle在Android项目中生成Jacoco报告 - How to generate jacoco report in android project with gradle 在 Visual Studio Code (VsCode) 和 Java 中使用 SonarLint 时出错 11 - Error using SonarLint in Visual Studio Code (VsCode) and Java 11 使用mvn assembly:single建立具有依赖关系的jar时,如何包含本地jar? - How do you include a local jar when using mvn assembly:single to build a jar-with-dependencies? 如何在 VSCode 中重置或更改 SonarLint 的规则? - How can I reset or change rules for SonarLint in VSCode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM