Does Load Impact use overzealous linting?


“Functions declared within loops referencing an outer scoped variable may lead to confusing semantics.”, means I can’t run a K6 script with a loop on Load Impact. Is there any way to force it to run?

Background: I’ve been having problems with tight login rate limits which have meant that I set up a loop in K6 to repeat logged in tasks after each VU has logged in. This appears to work perfectly when I run it locally, but Load Impact refuses to run, I’m assuming because of a linting rule.


Thank you for reporting this and sorry for the late reply. I agree that the linting could be overzealous - we’ll work on improving it, and we’re also working on a fix that would allow the execution of scripts with linting errors in them. We’ll just show a warning before actually starting the test run, but you’d be able to start it despite that.

As a temporary workaround until that is done, you can save the script locally and launch the cloud test run via the k6 cloud script.js command (docs here) - it doesn’t do any linting of the supplied script.


Thank you Nedyalko, that should do it.