A.7 library(check): Consistency checking
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(check): Consistency checking
          • check/0
          • list_undefined/0
          • list_undefined/1
          • list_autoload/0
          • list_redefined/0
          • list_cross_module_calls/0
          • list_void_declarations/0
          • list_trivial_fails/0
          • list_trivial_fails/1
          • trivial_fail_goal/1
          • list_strings/0
          • list_strings/1
          • list_rationals/0
          • list_rationals/1
          • list_format_errors/0
          • list_format_errors/1
          • string_predicate/1
          • valid_string_goal/1
          • checker/2
          • list_confusable_identifiers/0
          • list_confusable_identifiers/1
    • Packages
Availability::- use_module(library(check)).
Source[det]list_confusable_identifiers
[det]list_confusable_identifiers(+Options)
Walk every clause in the modules selected by module_class (default [user]) and warn on atoms whose written form is a possible UTS #39 spoof. Two issues are reported:

  • an atom whose unicode_restriction_level/2 is not safe (worse than single_script), reported at the first source location where it occurs;
  • groups of distinct atoms with equal unicode_skeleton/2 — two identifiers in the same program that look the same.

    Only atoms whose written form does not require quotes are considered (see’$needs_quotes’/1). Loaded via the multifile check:checker/2 hook, so a plain check/0 runs this check too.