Skip to content

fix functions trapped in cursor-agent-install function scope#2

Open
lclark wants to merge 1 commit intochocoelho:mainfrom
lclark:fix-function-scope
Open

fix functions trapped in cursor-agent-install function scope#2
lclark wants to merge 1 commit intochocoelho:mainfrom
lclark:fix-function-scope

Conversation

@lclark
Copy link
Copy Markdown

@lclark lclark commented Apr 24, 2026

All functions defined after cursor-agent-install were trapped within its scope. This change properly terminates cursor-agent-install scope.

Summary by Sourcery

Bug Fixes:

  • Correct the unmatched parentheses in cursor-agent installation and README helper code so later functions are not inadvertently defined within their scope.

All functions defined after cursor-agent-install were trapped within
its scope. This change properly terminates cursor-agent-install scope.
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 24, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Fixes unbalanced parentheses in cursor-agent-install and README-opening logic so that later functions are no longer captured within the cursor-agent-install function scope and the file terminates cleanly with provide.

File-Level Changes

Change Details Files
Corrected the closing of the cursor-agent-install function so subsequent definitions are no longer inside its scope.
  • Added an extra closing parenthesis after the async install function’s final nil return to properly terminate the let/lambda/defun structure
  • Ensured the cursor-agent-install form is syntactically balanced so later top-level defuns are evaluated as separate functions
cursor-agent.el
Adjusted the README-opening helper’s conditional to balance parentheses and avoid over-closing the surrounding form.
  • Removed one trailing parenthesis from the error branch of the README-opening logic so its if/cond form is properly closed without affecting outer scopes
  • Ensured the file ends with a clean top-level (provide 'cursor-agent) form not accidentally nested within a previous expression
cursor-agent.el

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant