Skip to content

test: the static analysis tooling - #22

Open
niheaven wants to merge 2 commits into
masterfrom
chore/test-static-analysis
Open

niheaven wants to merge 2 commits into
masterfrom
chore/test-static-analysis

Conversation

@niheaven

@niheaven niheaven commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Test fixtures for the static analysis tooling added in ScoopInstaller/Scoop.

  • bin/deadcode.ps1: wrapper delegating to $env:SCOOP_HOME/bin/deadcode.ps1, the same way bin/checkhashes.ps1 delegates.

  • bucket/issue/deprecated-env.json: calls the deprecated env function from pre_install.

  • bucket/issue/deprecated-fullpath.json: calls the deprecated fullpath function from post_install.

  • bucket/issue/deprecated-add-path.json: calls the deprecated add_first_in_path function from an architecture installer.

  • Relates to test(static-analysis): Add dot-source dependency and dead code checks Scoop#6787

@github-actions

Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

Invalid manifests

  • broken-app
  • clean-app
  • old-app

Check the full log for details.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Summary by CodeRabbit

  • New Features
    • Added installation definitions for clean-app and old-app, including download details and setup steps. clean-app sets an application home location and checks its installed version. old-app configures its settings and data locations and adds its binaries to the system path. These entries make both applications available through the package catalog with their specified installation behavior.

Walkthrough

The pull request adds a PowerShell wrapper for the installed deadcode script and three bucket package manifests. The manifests include two app configurations and one invalid JSON fragment.

Changes

Deadcode Wrapper

Layer / File(s) Summary
Deadcode wrapper invocation
bin/deadcode.ps1
The wrapper conditionally initializes SCOOP_HOME, invokes the installed deadcode.ps1 script with the parent bucket directory, and forwards arguments. It sets PassThru when another pipeline command follows.

Bucket Manifests

Layer / File(s) Summary
Package manifest examples
bucket/c/clean-app.json, bucket/o/old-app.json, bucket/b/broken-app.json
clean-app.json defines version, download, environment, pre-install, and version-check settings. old-app.json defines download metadata and pre-install, post-install, and installer commands. broken-app.json contains invalid JSON.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 6f6b3

The wrapper can recurse under a same-path configuration. Guard that case before invoking the analyzer; the known risk is limited to that configuration.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description states the general purpose and issue relation, but it lists fixture files that are not in the changes and omits the actual broken-app, clean-app, and old-app changes. Update the description to list the files and behavior that this pull request actually changes. Include the required contributing-guide checklist status.
Passed Passed checks: 4 passed
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed The description includes a relevant issue reference: ScoopInstaller/Scoop#6787.
Out of Scope Changes check Passed The changed files support the stated objective of testing static-analysis tooling. No unrelated changes are evident.
Title check Passed The title clearly identifies testing work for the static-analysis tooling, which matches the main purpose of the changes.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b931bf8-33c1-45e6-b0da-2d20c31bff0b
📥 Commits

Reviewing files that changed from the base of the PR and between adca940 and 6f6b38e.

📒 Files selected for processing: 4
  • bin/deadcode.ps1
  • bucket/b/broken-app.json
  • bucket/c/clean-app.json
  • bucket/o/old-app.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread bin/deadcode.ps1 Resolved
@niheaven niheaven changed the title (chore): test the static analysis tooling test: the static analysis tooling Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant