Understanding code issues generated by Amazon Q Developer - Amazon Q Developer

Understanding code issues generated by Amazon Q Developer

Note

The following information about code issues is available in JetBrains IDEs and Visual Studio Code. For information about code issues in Visual Studio, see Address code issues in Visual Studio.

A code issue generated by an Amazon Q review indicates that a security or quality issue was detected in your code. Code issues include the following details:

  • Code issue name and severity – Listed at the top of the panel, the CWEs and name of the issue, in addition to the severity of the issue. For more information about severity, see Code issue severity in Amazon Q Developer code reviews.

  • Code issue description – Describes the problem with the line or lines of code that generated the code issue.

  • Common Weakness Enumeration (CWE) – One or more CWE types that apply to the detector that identified the code issue. Choose the CWE link to learn more about it.

  • Directory library – A link to the detector in the Amazon Q Detector Library that generated the code issue.

  • File path – The location of the file that contains the code that generated the code issue.

Learn more about a code issue

When Amazon Q detects a code issue, it underlines the affected code in your IDE file, and adds the issue to the Code Issues tab. You take the following actions to learn more about the code issue:

  1. To see the code that generated the code issue, choose the issue from the Code Issues tab. The file where the code is written opens and the problematic code is underlined.

    The following image shows the Code Issues tab in Visual Studio Code.

    The Code Issues tab in Visual Studio Code.
  2. To see code issue details, choose the issue, and then choose the magnifying glass icon to open the Code Issue Details panel. You can also hover your cursor over the underlined code to see a popover with the same information.

    The following image shows the magnifying glass icon for a code issue in Visual Studio Code.

    The magnifying glass icon for a code issue in Visual Studio Code, used to open the Code Issue Details panel.