Skip to content

Improve targetname input checks#6142

Merged
waruqi merged 11 commits intoxmake-io:devfrom
Shiffted:invalid-target-errors
Feb 11, 2025
Merged

Improve targetname input checks#6142
waruqi merged 11 commits intoxmake-io:devfrom
Shiffted:invalid-target-errors

Conversation

@Shiffted
Copy link
Contributor

@Shiffted Shiffted commented Feb 8, 2025

Applies the help/error message for invalid targets from action run to more actions/plugins, makes it generally available and improves on it.
I replaced existing checks and added checks to actions that would try to access a nil target when given an invalid input targetname.
The levenshtein function now also takes options for costs which the find_similar_targetnames function makes use of.

Currently this is only applied to actions/plugins but could also be used for e.g. xpack.
I'm unsure where to put the new files or if the current location is appropriate.

@waruqi waruqi merged commit 4ed3612 into xmake-io:dev Feb 11, 2025
20 of 22 checks passed
@waruqi waruqi added this to the v2.9.9 milestone Feb 11, 2025
@Shiffted Shiffted deleted the invalid-target-errors branch February 11, 2025 21:48
@Shiffted Shiffted restored the invalid-target-errors branch March 11, 2025 19:54
@Shiffted Shiffted deleted the invalid-target-errors branch March 11, 2025 19:55
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.

2 participants