Report order-sensitive option handling in the loaded program.
Unlike check_predicate_options/0, this is not part of check/0; it is
an opt-in linter intended for audits. It reports two patterns:
- Category A - raw option access
-
A list known to be an option list (because it is a declared option
argument or is passed to a predicate that processes options) is
inspected using memberchk/2, member/2 or select/3 rather than
option/2. Raw list search is order-agnostic and does not honour
the Name=Value form, so it may disagree with option/2 (leftmost
wins) semantics.
- Category B - override defeated by rightmost-wins
-
A partial list
[Opt,...|Tail] is passed to a predicate that
resolves options with PL_scan_options() (rightmost wins, e.g.
open/4). The prepended options look like an override but are
defeated by a duplicate in Tail. Append the option or use
merge_options/3 instead.
Spec is a module or a Module:Name/Arity.