DeepsourceDeepSource
Help CenterGetting Started with DeepSourceFirst Code Analysis with DeepSource

First Code Analysis with DeepSource

Last updated March 5, 2024

Introduction

Performing your first code analysis with DeepSource is a significant milestone towards maintaining a high-quality, secure codebase. DeepSource's automated analysis tools can identify potential issues in your code, including bugs, security vulnerabilities, and code smells, before they become problems. This guide will walk you through conducting your first code analysis with DeepSource, helping you understand the process and how to interpret the results to improve your code.

Step-by-Step Guide to Your First Code Analysis

  1. Ensure DeepSource Integration
  • Before proceeding, make sure your DeepSource account is set up and your code repository is integrated with DeepSource. If you haven't done this yet, refer to our "Integrating DeepSource with Your Code Repository" article.
  1. Navigate to Your Project Dashboard
  • Log in to your DeepSource account and navigate to the dashboard. Here, you'll see a list of your integrated repositories. Select the repository you want to analyze.
  1. Trigger an Analysis
  2. Review the Analysis Report
  • Once the analysis is complete, DeepSource will generate a report detailing the findings. Access this report through your project dashboard on DeepSource. The report categorizes issues by type, such as security vulnerabilities, performance issues, and code smells.
  1. Understand the Issue Categories
  • Take some time to familiarize yourself with the different issue categories. DeepSource provides detailed descriptions for each issue, including the potential impact and suggestions for resolution.
  1. Prioritize Issues for Resolution
  • Based on the analysis report, prioritize issues that need immediate attention, such as critical security vulnerabilities or major bugs. DeepSource allows you to sort and filter issues to help with prioritization.
  1. Fix Issues in Your Code
  • Start addressing the identified issues in your codebase. For each issue, DeepSource provides specific guidance on how to resolve it. Apply these fixes in your code and commit the changes to your repository.
  1. Re-analyze After Fixes
  • After making changes to your code, trigger another analysis by committing your changes or creating a new pull request. This will help you verify that the issues have been successfully resolved.
  1. Iterate and Improve
  • Code quality and security are ongoing concerns. Continue to use DeepSource for regular analyses of your codebase, iteratively fixing issues and improving the overall health of your project.

Conclusion

Conducting your first code analysis with DeepSource is just the beginning of a journey towards a cleaner, more secure codebase. By regularly analyzing your code and addressing identified issues, you can significantly improve the quality and security of your projects. DeepSource provides the tools and guidance needed to make this process as efficient and effective as possible, allowing you to focus on what you do best: building great software.

Was this article helpful?