@@ -15,7 +15,7 @@ body action if_elapsed(x)
1515##
1616
1717body action if_elapsed_day
18- # @brief Evalute the promise once every 24 hours
18+ # @brief Evaluate the promise once every 24 hours
1919{
2020 ifelapsed => "1440"; # 60 x 24
2121 expireafter => "1400";
@@ -58,7 +58,7 @@ body action warn_only
5858
5959##
6060
61- body action bg(elapsed,expire)
61+ body action bg(elapsed, expire)
6262# @brief Evaluate the promise in the background every `elapsed` minutes, for at most `expire` minutes
6363# @param elapsed The time in minutes between promise evaluations
6464# @param expire The time in minutes after which a repair-attempt gets cancelled
@@ -96,7 +96,7 @@ body action policy(p)
9696
9797##
9898
99- body action log_repaired(log,message)
99+ body action log_repaired(log, message)
100100# @brief Log `message` to a file `log`=[/file|stdout]
101101# @param log The log file for repaired messages
102102# @param message The log message
@@ -116,8 +116,10 @@ body action log_verbose
116116##
117117
118118body action sample_rate(x)
119- # @brief Evaluate the promise every `x` minutes,
120- # A repair-attempt is cancelled after 10 minutes
119+ # @brief Evaluate the promise every `x` minutes
120+ #
121+ # A repair-attempt is cancelled after 10 minutes.
122+ #
121123# @param x The time in minutes between promise evaluation
122124{
123125 ifelapsed => "$(x)";
@@ -137,7 +139,7 @@ body classes if_repaired(x)
137139
138140##
139141
140- body classes if_else(yes,no)
142+ body classes if_else(yes, no)
141143# @brief Define the classes `yes` or `no` depending on promise outcome
142144# @param yes The name of the class that should be defined if the promise is kept or repaired
143145# @param no The name of the class that should be defined if the promise could not be repaired
@@ -151,7 +153,7 @@ body classes if_else(yes,no)
151153
152154##
153155
154- body classes cf2_if_else(yes,no)
156+ body classes cf2_if_else(yes, no)
155157# @brief Define the classes `yes` or `no`, depending on promise outcome
156158#
157159# A version of `if_else` that matches CFEngine2 semantics. Neither class is set if the promise
@@ -199,7 +201,7 @@ body classes if_ok_cancel(x)
199201
200202##
201203
202- body classes cmd_repair(code,cl)
204+ body classes cmd_repair(code, cl)
203205# @brief Define the class `cl` if an external command in a `commands`, `file` or `packages`
204206# promise is executed with return code `code`
205207# @param code The return codes that indicate a successful repair
@@ -224,8 +226,8 @@ body classes classes_generic(x)
224226
225227body classes results(scope, class_prefix)
226228# @brief Define classes prefixed with `class_prefix` and suffixed with
227- # appropriate outcomes: _kept, _repaired, _not_kept, _error, _failed,
228- # _denied, _timeout, _reached
229+ # appropriate outcomes: ` _kept`, ` _repaired`, ` _not_kept`, ` _error`, ` _failed` ,
230+ # ` _denied`, ` _timeout`, ` _reached`
229231#
230232# @param scope The scope in which the class should be defined (`bundle` or `namespace`)
231233# @param class_prefix The prefix for the classes defined
@@ -245,7 +247,7 @@ body classes results(scope, class_prefix)
245247# This body is a simpler, more consistent version of the body
246248# `scoped_classes_generic`, which see. The key difference is that
247249# fewer classes are defined, and only for outcomes that we can know.
248- # For example this body does not define "OK/ not OK" outcome classes,
250+ # For example this body does not define "OK"/" not OK" outcome classes,
249251# since a promise can be both kept and failed at the same time.
250252#
251253# It's important to understand that promises may do multiple things,
@@ -321,7 +323,7 @@ body classes results(scope, class_prefix)
321323@if minimum_version(3.8)
322324body classes diff_results(scope, x)
323325# @brief Define `x` prefixed/suffixed with promise outcome with command return codes adjusted to align with `diff`.
324- # @param scope The scope the class should be defined with [ bundle| namespace] .
326+ # @param scope The scope the class should be defined with (` bundle` or ` namespace`) .
325327# @param x The unique part of the classes to be defined.
326328#
327329# From man diff:
@@ -352,7 +354,7 @@ body classes diff_results(scope, x)
352354{
353355 inherit_from => results( $(scope), $(x) );
354356 kept_returncodes => { "0" };
355- failed_returncodes => { "1","2" };
357+ failed_returncodes => { "1", "2" };
356358}
357359@endif
358360
0 commit comments