KScript docs
EN

Lint standards

Fixing what can be fixed

kscript check --fix applies the fixes that are always safe, then checks what is left:

CommandWhat it does
kscript check --fixThe current project.
kscript check --fix scripts/report.kscriptOne file.
kscript check --warnings-as-errorsFor CI: fail on warnings too.

It rewrites every old spelling, which is how a script that no longer runs is brought up to date. Text written as a bare word is put in quotes (KS6009), yes and no become true and false (KS6011), a list written as text becomes an array (KS6006), and the other old spellings are replaced by the one that is kept (KS6010, KS6012, KS6014). It also adds the unit to a length of time (KS6018) and puts text with nothing to fill in into single quotes (KS6020).

A style rule the project turned off in lint.rules is not fixed. Other problems keep their quick fixes in the editor and in kscript check --output json, where each one comes with its exact text edits.

Edit this page on GitHub