Issues

The Issues tab compiles all code health issues currently detected in the default branch of this repository.

The Issues Tab

Category-wise issue distribution

On the left-hand side, you'll find a breakdown of all issues by category, and the 'Recommended' tab displays the most critical issues that require immediate attention.

In the main section, individual issues are listed on cards that display their titles, categories, and total occurrences within the repository. You can filter this list by category or analyzer to focus on specific issues.

Sorting Issues

You can sort the order of the displayed issues with the following options:

  • Most frequent: Sort in decreasing order of the number of occurrences of an issue (issues with the most occurrences appear first).
  • Least frequent: Sort in increasing order of the number of occurrences of an issue (issues with the least occurrences appear first).
  • First seen: Show the oldest detected issues first.
  • Last seen: Show the newly detected issues first.

Autofix™

With Autofix™, you can quickly generate fixes for hundreds of code health issues across all files in your repository and apply them as a new pull request or commit to an existing one with just a few clicks.

When you open an issue from the dashboard that has Autofix™ support, you'll see the Autofix™ button at the top. Click on it and select the files you want to apply Autofix™ to.

DeepSource will then generate the fixes, which typically take a few seconds. Once you've verified the fixes, simply click the 'Create pull request' button, and DeepSource will automatically create a pull request for the issue's fixes in your repository.

Filter by Autofix™

Instead of looking around for issues that have an Autofix™ available, you can directly filter them out by selecting the Filter by Autofix™ option. While it's active, it'll have a green indicator.

Searching for issues

If you have a particular issue in mind to fix, finding it quickly using the Search bar is your best option. The Search bar can be used to look for specific issues based on keywords from the issue title, or some code present in the issue.

📘

Regular use of DeepSource will help you become accustomed to its issue titles, making it much more convenient to search for them.

The Issue occurrence page

The Issue Occurrence page displays all occurrences of a selected issue in the codebase and provides contextual code to help understand it. Clicking on any issue directs you to this page. On the right, you'll find a detailed description of the issue, which is particularly helpful if you haven't encountered it before and need guidance on how to resolve it.

Ignoring issues

There can be several reasons why you would want to ignore an issue and prevent it from popping in the Issues tab after every analysis. Some of the obvious reasons are:

  • The issue is intentional or irrelevant
  • The team don't want to fix the issue in the immediate future
  • The issue is a false-positive

Here are the ways to ignore an issue:

Ignore issues in file(s)

  • On the issue occurrence page, click on the 'Ignore this issue' button on the top right corner.

  • You'll see the three options for ignoring an issue:

    • For a file pattern: You would want to ignore an issue for files that match a pattern: say you don’t care about documentation issues in an internal package — all files matching contrib/utils/*.py. You can now ignore the issue for a specific pattern by clicking Ignore this issueFor a file pattern, and then entering the file pattern. All occurrences of this issue that match the file pattern provided will be removed, and the rule will take into effect from the subsequent analysis.
      • For all test files: If the test patterns are specified in the .deepsource.toml file, DeepSource will use this information to filter out a number of issues that don’t make sense in test files, but do so in the application code. You can ignore an issue for all the test files in the repository. Click Ignore this issueFor all test files This will remove all occurrences of an issue in the specified test files. If there are no test patterns specified in the .deepsource.toml file, you'll get a prompt that tells you no test patterns are defined in the repository's deepsource.toml.
      • For all files: If you decide you don’t particularly care about an issue, you can ignore it for all files in the repository. Click Ignore this issue → For all files. This will remove all occurrences of an issue in the repository, and ignore the issue from the subsequent analysis.

Ignore an occurrence of an issue

On the issue description page, click on the ban button on the top right corner of a particular occurrence of an issue. You'll see the following menu:

  • You can ignore a particular occurrence of an issue if you think that is intentional. To permanently silence an issue, you can use skipcq rule, read more about it here.
  • Ignore an issue if you think it is a false-positive.
  • If there are multiple occurrences of an issue in a file that you want to ignore, you choose the last option to ignore all the occurrences.

False-positives

A false-positive is an issue detected by DeepSource that is simply invalid or incorrect. False-positive issues are detected due to the flawed detection logic. In most cases, if an issue is flagged incorrectly, it's because of the limitations of the analyzer. If you come across one in your codebase, you should report it. This will remove the occurrence of that issue, and also notify our engineering team, who can incorporate this feedback into making analyzers more reliable, and less noisy.

Reporting a false-positive

If you believe you've come across a false-positive, you can report it directly from the dashboard:

  • To ignore a particular occurrence of an issue, click on the ban button on the top right corner of that occurrence and select 'This is a false-positive' from the menu.

  • A pop-up window appears with a text box where you have to option to enter the details about the false-positive; click on the 'Confirm and ignore' button to submit the report.

📘

Every false-positive report is sent directly to our engineering team, and they reach out to the reporter as soon as possible.


What’s Next