Skip to content

fix: skip everything if there's no rule#271

Merged
CPunisher merged 1 commit intomainfrom
08-15-fix/skip-if-no-rules
Aug 15, 2025
Merged

fix: skip everything if there's no rule#271
CPunisher merged 1 commit intomainfrom
08-15-fix/skip-if-no-rules

Conversation

@CPunisher
Copy link
Copy Markdown
Contributor

This is also good for the performance I think.

Copilot AI review requested due to automatic review settings August 15, 2025 06:31
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 15, 2025

Deploy Preview for rslint canceled.

Name Link
🔨 Latest commit 60ecb4d
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/689ed44aac3afb00083f8149

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes the linter performance by skipping file processing when no rules are applicable to a file. This avoids unnecessary comment parsing and disable manager creation for files that won't be linted.

Key Changes

  • Early exit from file processing loop when no rules are found for a file
  • Defers expensive comment parsing until rules are confirmed to exist
  • Avoids creating disable manager objects for files without applicable rules

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@CPunisher CPunisher enabled auto-merge (squash) August 15, 2025 06:36
@CPunisher CPunisher merged commit d05a73c into main Aug 15, 2025
13 checks passed
@CPunisher CPunisher deleted the 08-15-fix/skip-if-no-rules branch August 15, 2025 07:01
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