Fix plugin directory structure inconsistency in PluginCreateCommand#86
Open
wilsonatb wants to merge 1 commit into
Open
Fix plugin directory structure inconsistency in PluginCreateCommand#86wilsonatb wants to merge 1 commit into
wilsonatb wants to merge 1 commit into
Conversation
Member
|
I think I'd probably prefer this the other way around: so the validator changes Thoughts @shanerbaner82 ? |
Updates PluginValidateCommand to check both nested and flat structures, gracefully falling back to flat directories (resources/android, resources/ios). This prevents false positive warnings on freshly created plugins while keeping support for the nested architecture.
66ef072 to
f7e148c
Compare
Author
|
@simonhamp I completely agree with your approach. It makes much more sense to make the validator smarter rather than forcing a specific scaffolding structure, especially since the I've updated the PR. I reverted the changes to the creator and instead updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated PR based on simonhamp feedback to adapt the validator instead of the creator.
Problem Description
Freshly created plugins generate a flat directory structure (
resources/android/andresources/ios/), butPluginValidateCommandstrictly expects a nested structure (/src/and/Sources/), resulting in false positive warnings likeNo native code directories found.Solution
Instead of forcing the creation command to use nested folders, this PR updates
PluginValidateCommandto support both architectures.What changed in
PluginValidateCommand.php:This aligns the validator with the core
Pluginclass which already supports both approaches seamlessly.Testing
native:plugin:validate(passed with a cleanOKand 0 warnings).Visual Proof (Before & After)
Before (Current Main):
After (This PR):