sketch-hq/sketch-assistant-core-rules

`artboards-layout` rule shows false positives and triggers multiple times for the same artboard

christianklotz opened this issue · 5 comments

In the same document given for QA of https://github.com/sketch-hq/Sketch/issues/27973, both artboards were flagged, despite one fully conforming to the layout settings. Also, both artboards were flagged twice for some reason. See demo video https://sketch.slack.com/archives/CRJLL8E80/p1578903499021700?thread_ts=1578863401.017800&cid=CRJLL8E80

This one is a bit confusing. I can reproduce some of your issues with this rule building Sketch from develop and in Sketch Experimental, but I can't reproduce when linting in Node using the same config and Sketch doc. Will need to dig further.

@christianklotz After some digging I think this is due to the horizontalOffset value in your config being mangled from 0 to false on the native side, and disrupting the rule logic. Would also explain why it works in Node, but not in Sketch.

I'm right in thinking a fix for this is incoming from @craig006 ? In which case we can either close this issue, or move it to the Sketch repo and track it there ...

Also once the full rule option validation lands in Sketch we would have quickly figured this out via a rule error.

Ah, yes. That makes sense, linking to https://github.com/sketch-hq/Sketch/issues/27923 for reference.

This should be fixed now in the latest build.

Confirmed as fixed in 63 (92230) experimental along with #27923.