Skip to content

Fixes #2938 : detect indented wildcard and module imports#2939

Open
mirkoalicastro wants to merge 3 commits into
diffplug:mainfrom
mirkoalicastro:fix/forbid-imports-leading-whitespace
Open

Fixes #2938 : detect indented wildcard and module imports#2939
mirkoalicastro wants to merge 3 commits into
diffplug:mainfrom
mirkoalicastro:fix/forbid-imports-leading-whitespace

Conversation

@mirkoalicastro
Copy link
Copy Markdown
Contributor

@mirkoalicastro mirkoalicastro commented May 19, 2026

Both ForbidWildcardImportsStep and ForbidModuleImportsStep anchored their regex with ^import, so leading whitespace (valid Java) escaped the lint.

Fixes #2938

(I had to re-trigger the CI pipeline with an empty commit since I got a Failed to provision P2 dependencies issue)

@mirkoalicastro mirkoalicastro force-pushed the fix/forbid-imports-leading-whitespace branch from 51974c3 to 77a4f71 Compare May 19, 2026 21:11
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.

ForbidWildcardImports misses indented import statements

1 participant