Skip to content

Find imports without a space or with extra spaces - #58

Merged
dblock merged 1 commit into
masterfrom
dblock/import-without-space
Nov 25, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/import-without-space

Conversation

@dblock

@dblock dblock commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Matches local and global imports with a regex that allows any spacing (including none) after # and import, so #import"header.h", #import<Foo/header.h>, and # import "header.h" all count as references.

Closes #14.

Validation: bundle exec rake (RuboCop and RSpec, 45 examples, 0 failures). The new import_without_space fixture spec fails without the change.

This PR was written by an AI (Claude) acting on behalf of @dblock.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21jbMhZrzCZWr9QtJeM

@dblock
dblock force-pushed the dblock/import-without-space branch from 29eb29d to b069b8b Compare November 25, 2026 13:15
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Danger Report

No issues found.

View run

Match `#import"header.h"`, `#import<Foo/header.h>`, and `#  import   "header.h"`
with a regex instead of requiring exactly one space.

Closes #14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21jbMhZrzCZWr9QtJeM
@dblock
dblock force-pushed the dblock/import-without-space branch from b069b8b to 4adc38b Compare November 25, 2026 13:59
@dblock
dblock merged commit 8d099f1 into master Nov 25, 2026
5 checks passed
@dblock
dblock deleted the dblock/import-without-space branch November 25, 2026 14:03
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.

Support #import without spaces

1 participant