Skip to content

Config: Fix rule-level patterns for matching absolute file paths#1645

Merged
marcoroth merged 1 commit into
mainfrom
normalize-absolute-file-paths-for-rule-patterns
Apr 18, 2026
Merged

Config: Fix rule-level patterns for matching absolute file paths#1645
marcoroth merged 1 commit into
mainfrom
normalize-absolute-file-paths-for-rule-patterns

Conversation

@marcoroth

@marcoroth marcoroth commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Rule-level exclude, include, and only patterns in .herb.yml silently failed when the linter received an absolute file path (e.g., from the VS Code extension).

The glob patterns are relative (e.g., app/views/layouts/jasmine.*), but picomatch/globset won't match them against absolute paths like /home/user/project/app/views/layouts/jasmine.html.erb.

This adds path normalization in both the JavaScript and Rust config packages. When a file path is absolute and starts with the project path, it gets stripped to a relative path before pattern matching.

Might fix #1630

@pkg-pr-new

pkg-pr-new Bot commented Apr 18, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@1645
npx https://pkg.pr.new/@herb-tools/language-server@1645
npx https://pkg.pr.new/@herb-tools/linter@1645

commit: 8e36aa6

@github-actions

github-actions Bot commented Apr 18, 2026

Copy link
Copy Markdown

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 8e36aa6


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth merged commit b0a45f6 into main Apr 18, 2026
20 checks passed
@marcoroth marcoroth deleted the normalize-absolute-file-paths-for-rule-patterns branch April 18, 2026 23:56
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.

Linter: Complains despite file being excluded for that rule

1 participant