Skip to main content

Module loader

Module loader 

Source
Expand description

Parse .LICENSE and .RULE files.

This module provides two-stage loading:

  1. Loader-stage: Parse files into LoadedRule and LoadedLicense
  2. Build-stage: Convert to runtime Rule and License (deprecated filtering, etc.)

The loader-stage functions (parse_rule_to_loaded, parse_license_to_loaded, load_loaded_rules_from_directory, load_loaded_licenses_from_directory) return all entries including deprecated ones. Deprecated filtering is a build-stage concern.

Functionsยง

load_licenses_from_directory
Load all .LICENSE files from a directory into License values (backward-compatible).
load_loaded_licenses_from_directory
Load all .LICENSE files from a directory into LoadedLicense values (loader-stage).
load_loaded_rules_from_directory
Load all .RULE files from a directory into LoadedRule values (loader-stage).
load_rules_from_directory
Load all .RULE files from a directory into Rule values (backward-compatible).
parse_license_to_loaded
Parse a .LICENSE file into a LoadedLicense (loader-stage).
parse_rule_to_loaded
Parse a .RULE file into a LoadedRule (loader-stage).