Skip to content

Conversation

@spatten
Copy link
Contributor

@spatten spatten commented Nov 8, 2025

Overview

Implements the CLI side of ANE-2647.

The Ficus side is implemented in https://github.com/fossas/ficus/pull/105.

We want to output a "Snippet Scan Summary" in the CLI. It will look something like this:

  ============================================================
  Snippet scan summary:
    Analysis ID: 110054
    Bucket ID: 110551
    Files skipped: 6
    Total Files processed: 18
    Unique Files processed: 13
    Unique Files with matches found: 4
    Unique Files with no matches found: 9
    Unique Files already in our knowledge base: 11
    Unique Files new to our knowledge base: 2
    Processing time: 0.087s
  ============================================================

Acceptance criteria

  • We parse the snippet scan statistics from Ficus
  • We output a snippet scan summary

Testing plan

Update the version of Ficus in vendor-bins to one that outputs the snippet scan statistics.

cd $ficus
cargo install --path ficus
cp `which ficus` $cli/vendor-bins

Now run an analysis:

cabal run fossa -- analyze --x-snippet-scan $scandirs/snippet-demo-dir

You should see some statistics output. Make sure that the numbers add up (see test plan of https://github.com/fossas/ficus/pull/102 for more)

Risks

Metrics

Is this change something that can or should be tracked? If so, can we do it today? And how? If its easy, do it

References

Slack thread discussing the output format and wording: https://teamfossa.slack.com/archives/C05PF0KBL8N/p1762562595198619

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this PR added docs, I added links as appropriate to the user manual's ToC in docs/README.ms and gave consideration to how discoverable or not my documentation is.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an ## Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json AND I have updated example files used by fossa init command. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
  • If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.

@spatten spatten requested a review from nficca November 13, 2025 23:35
@spatten spatten marked this pull request as ready for review November 13, 2025 23:35
@spatten spatten requested a review from a team as a code owner November 13, 2025 23:35
@spatten spatten mentioned this pull request Nov 17, 2025
6 tasks
@spatten spatten merged commit e2211ce into master Nov 21, 2025
19 of 20 checks passed
@spatten spatten deleted the snippet-scan-summary branch November 21, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants