Compiler lint checker


Although not technically a developer tool, it is worth mentioning the Logtalk compiler lint checker features as they contribute to earlier detection and warning of source code issues. Lint checks include:

  • Missing directives (including scope, meta-predicate, dynamic, discontiguous, and multifile directives)
  • Duplicated directives
  • Missing predicates (calls to non-declared and non-defined predicates)
  • Calls to declared but not defined static predicates
  • Non-portable predicate calls, arithmetic function calls, directives, flags, and flag values
  • References to unknown entities (objects, protocols, categories, or modules)
  • Goals that are always true or always false
  • Trivial goal fails (due to no matching predicate clause)
  • Redefined built-in predicates
  • Lambda expression unclassified variables and mixed up variables