mpalmer / action-validator

Tool to validate GitHub Action and Workflow YAML files
GNU General Public License v3.0
271 stars 25 forks source link

For the purposes of negative globs, treat them as positive globs. #67

Closed krainboltgreene closed 5 months ago

krainboltgreene commented 6 months ago

In Github you can define a "negative glob" aka, "not this path". To still validate this type of glob we simply check the opposite of that path.

mpalmer commented 6 months ago

Hi Kurtis, good catch. I've never used a negative glob myself, so I guess that's why they don't work. :joy:

Clippy's got a bone to pick with you -- although I would have expected a regular build to fail, too, so I'll ponder what's going on there some other time. If you can add a couple of tests to the pile in test (maybe 003a_successful_negative_globs and 004a_failing_negative_globs?) that'll let me just click the "Merge" button when all the checks are green.

krainboltgreene commented 6 months ago

Yeah I'm not sure what the problems here are, as all the documentation details this function as taking 2 arguments.

krainboltgreene commented 6 months ago

oh, lol there's a replace function on Option: https://doc.rust-lang.org/std/option/enum.Option.html#method.replace

mpalmer commented 6 months ago

Thanks for the updates, Kurtis. I'll get onto this by next week, I promise. :crossed_fingers:

krainboltgreene commented 6 months ago

@mpalmer Any chance you could run the actions?

mpalmer commented 6 months ago

Sorry, I thought once I'd approved them once they'd be run automatically thereafter. TIL...

mpalmer commented 5 months ago

I created a second PR, #71, based on yours, and fixed up a few things. It's now merged, so we can consider this done, I reckon. Thanks for your work to make it happen!