core.rawlint module

Linter for raw files. Ported from Lethosor’s Lua script: https://github.com/lethosor/dfhack-scripts/blob/master/raw-lint.lua

core.rawlint.check_df(path)[source]

Validates the raw/objects folder in the Dwarf Fortress folder located at <path>. Problem with individual files are printed to the log with level WARNING. General problems are printed to the log with level ERROR.

Returns:

(passed, failed) – two lists of paths of files that passed or failed, respectively.

core.rawlint.check_df_bool(path)[source]

Validates the raw/objects folder in the Dwarf Fortress folder located at <path> and returns True if all files pass validation. Problems with individual files are printed to the log with level WARNING. General problems are printed to the log with level ERROR.

core.rawlint.check_file(path)[source]

Validates the raw file located at <path>. Error details are printed to the log with level WARNING. Returns True/False.

core.rawlint.check_folder(path)[source]

Validates all raw files in <path> and its subfolders. Problems with individual files are printed to the log with level WARNING. General problems are printed to the log with level ERROR.

Returns:

(passed, failed) – two lists of paths of files that passed or failed, respectively.

core.rawlint.check_folder_bool(path)[source]

Returns True if all raw files in <path> pass validation. Problems with individual files are printed to the log with level WARNING. General problems are printed to the log with level ERROR.