Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.37 KB

hints.md

File metadata and controls

45 lines (33 loc) · 1.37 KB

Hints

Hints let you provide information on failing checks.

Hint Example

Hints are a way to help make images more approachable.

You can add a conditional hint or a check-wide hint. A conditional hint is printed when that specific condition is executed and fails. Make sure you understand the check precedence; this can be tricky, as sometimes your check is NOT executed (read about conditions).

Example conditional hint:

[[check]]
points = 5

	[[check.pass]]
	type = "ProgramInstalledNot"
	name = "john"

	[[check.pass]]
	# This hint will NOT print unless the condition above succeeds.
	# Pass conditions are logically AND-- they all need to succeed.
	# If one fails, there's no reason to execute the other ones.
	hint = "Ensure you're using a package manager to remove all of a tool's files, as well as the main program."
	type = "PathExistsNot"
	path = "/usr/share/john"

Check-wide hints are at the top level and always displayed if a check fails. Example check-wide hint:

[[check]]
hint = "Are there any 'hacking' tools installed?"
points = 5

	[[check.pass]]
	type = "ProgramInstalledNot"
	name = "john"

	[[check.pass]]
	type = "PathExistsNot"
	path = "/usr/share/john"

You can combine check-wide and conditional hints. If the check fails, the check-wide hint is ALWAYS displayed, in addition to any conditional hints triggered.