Skip to content

article

Browsing Repository Files and Diffs

How to explore a project's file tree, open an annotated file snippet, and view a scan as a unified diff.

Overview

Beyond ratings and issue tables, StretchDev lets you browse the code context behind a scan. You can open a project's file tree, view a file snippet annotated with its issues, and read a scan as a unified diff. These views help you jump from a finding straight to the place it lives.

Browse the file tree

  1. Open a project from the Projects tab.
  2. Choose Files (the repository tree view).
  3. StretchDev shows the project's default branch and a list of files. Files that have findings are surfaced first, each annotated with how many issues it carries, so the noisiest files are easy to spot.

The tree is derived from the project's recent scans and its metadata — it reflects the files StretchDev has actually seen findings in, plus sensible defaults for the project's primary language.

Open a file snippet

  1. From the file tree, click a file (or open a snippet for a specific path).
  2. StretchDev shows the file's contents rendered in the project's language, with the issues for that path called out as inline comments — each labeled with its severity, rule, and message.
  3. Use it to read the code around a finding without leaving the app.

If you open a snippet without choosing a path, StretchDev shows the most relevant file from the latest scan.

View a scan as a diff

  1. Open a scan from the Scans tab.
  2. Choose Diff.
  3. StretchDev renders the scan as a unified diff, summarizing the scan's key metrics (Maintainability, Security, issue count) and listing the affected files and the specific findings by file and line.

The diff view is a compact, review-style summary of what the scan found and where — handy for pasting context into a code review or a ticket.

Example

A scan of Billing API flags a critical vulnerability. You open the Files view, see src/charge.js at the top of the tree with an issue-count badge of 3, and click it. The snippet renders the file with an inline comment at line 42: // critical sql-injection: user input concatenated into a query. You switch to the scan's Diff view to grab a shareable summary — the affected file, the ratings, and the finding — and drop it into your team's review thread.

Tips

  • Sort your attention by the tree's issue-count annotations — the files with the most findings are the best place to start.
  • The snippet's inline comments mirror the issue table, so you can read findings in code context instead of as a flat list.
  • Use the Diff view to capture a scan summary for a pull-request description or a ticket.
  • File and snippet views reflect what recent scans have seen; run a fresh scan to surface newly changed files.

Troubleshooting

  • The tree shows only a couple of default files. That project has few or no stored findings yet — run a scan so StretchDev learns which files carry issues.
  • A snippet shows "No stored issue snippet is available for this path yet." There are no recorded findings for that file; pick a file that has an issue-count badge.
  • "Project not found" / "Scan not found." Confirm you're in the correct workspace and the project or scan still exists.

Was this helpful?

Help us improve this article

Use these controls to share whether this answer solved the issue. Feedback helps prioritize updates to StretchSuite Support.