Skip to content

fix(partial-instance-variable): ignore non-code at-rules - #467

Open
efegokdemir wants to merge 2 commits into
Shopify:mainfrom
efegokdemir:codex/fix-partial-instance-variable-comments-315
Open

efegokdemir wants to merge 2 commits into
Shopify:mainfrom
efegokdemir:codex/fix-partial-instance-variable-comments-315

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Fixes #315.

Limit PartialInstanceVariable to active ERB code instead of scanning raw partial text. ERB comments are ignored, and CSS or HTML at-rules such as @font-face no longer produce false positives.

Tests

  • Added regression coverage for ERB comments and CSS at-rules.
  • ruby -c lib/erb_lint/linters/partial_instance_variable.rb — passed.
  • ruby -c spec/erb_lint/linters/partial_instance_variable_spec.rb — passed.
  • git diff --check — passed.

RSpec remains unverified. The system Ruby is 2.6.10 and cannot satisfy this checkout's dependencies; the installed Homebrew Ruby is 4.0.7, but the lockfile's minitest 5.25.4 requires Ruby <4.0. Bundler also reported other lockfile gems missing. I did not modify Gemfile or Gemfile.lock.

@efegokdemir
efegokdemir force-pushed the codex/fix-partial-instance-variable-comments-315 branch from 6ad3a99 to f685695 Compare October 2, 2026 14:50

This branch has not been deployed

No deployments
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.

False positive for PartialInstanceVariable in ERB comment?

1 participant