Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support all languages for AI code review #253

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Hellebore
Copy link
Contributor

@Hellebore Hellebore commented Dec 3, 2024

Checklist

  • If package.json or yarn.lock have changed, then test the VSIX built by yarn run vsce package works from a direct install

Summary by Sourcery

New Features:

  • Add support for AI code review across all programming languages by generalizing the document selector to include all languages.

Copy link
Contributor

sourcery-ai bot commented Dec 3, 2024

Reviewer's Guide by Sourcery

The PR modifies the language client configuration to support all programming languages instead of being limited to specific ones. This is implemented by replacing the explicit language selectors with wildcard selectors that match any language across different schemes (file, untitled, and notebook cells).

Class diagram for LanguageClientOptions update

classDiagram
    class LanguageClientOptions {
        - diagnosticCollectionName: String
        - documentSelector: List
        - synchronize: Object
    }

    class DocumentSelector {
        + language: String
        + scheme: String
    }

    LanguageClientOptions --> DocumentSelector

    note for DocumentSelector "Updated to support all languages with wildcard '*'"
Loading

File-Level Changes

Change Details Files
Replaced specific language selectors with wildcards to support all languages
  • Removed individual language selectors for Python, JavaScript, TypeScript, and their variants
  • Removed specific YAML file pattern matchers for configuration files
  • Added wildcard language selector '' for file scheme
  • Added wildcard language selector '' for untitled scheme
  • Added wildcard language selector '*' for notebook cell scheme
src/extension.ts

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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
Contributor

@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 @Hellebore - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Using a wildcard () for language selection is too broad and could cause issues. Please explicitly list supported languages instead of using ''. Add new languages to the list as they become supported.
  • This change removes the specific handling for .sourcery.yaml configuration files. Please ensure these patterns are preserved to maintain configuration file functionality.
Here's what I looked at during the review
  • 🟢 Functionality: all looks good
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

LangSmith trace

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

src/extension.ts Show resolved Hide resolved
@Hellebore Hellebore merged commit 5c5eafd into main Dec 3, 2024
1 check passed
@Hellebore Hellebore deleted the nick/feat/support-all-file-types-for-review branch December 3, 2024 16:25
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