rlsbl v0.113.0 /rlsbl.lint.config
On this page

Lint configuration loading that reads per-project rule overrides and severity settings from .rlsbl/lint/ TOML configuration files.

#rlsbl.lint.config

#rlsbl.lint.config

Lint configuration loading that reads per-project rule overrides and severity settings from .rlsbl/lint/ TOML configuration files.

#LanguageLintConfig

Per-language lint settings loaded from .rlsbl/lint/.toml.

#_require_table

python
def _require_table(data: dict, key: str, config_path: str) -> dict

Return data[key] as a TOML table (dict), or the default empty dict.

An absent section keeps the empty-dict default. A section that is present but not a table is a hard error -- never silently coerced.

#_read_bool

python
def _read_bool(section: dict, full_key: str, config_path: str, default: bool, *, key: str) -> bool

Read section[key] as a bool. Absent keeps default; wrong type errors.

#_read_str_list

python
def _read_str_list(section: dict, full_key: str, config_path: str, default: list, *, key: str) -> list

Read section[key] as a list of strings.

Absent keeps default. A present value that is not a list, or a list containing a non-string element, is a hard error -- never silently used as-is (e.g. a bare string where a list is required).

#load_language_config

python
def load_language_config(project_path: str, language: str, releasable_lint_dir: str | None=None) -> LanguageLintConfig

Read the lint config for language, falling back to defaults if missing.

Two-level resolution (member wins wholesale, mirroring the config.json precedent): the member-level .rlsbl/lint/<language>.toml is used when it exists; otherwise, when the project belongs to a releasable and releasable_lint_dir is supplied, the releasable-level <releasable>/lint/<language>.toml is used. If neither exists, the per-language defaults apply.

#load_parser_setting

python
def load_parser_setting(project_path: str) -> str

Read parser type from .rlsbl/lint.toml, defaulting to 'ast'.

A missing file keeps the documented "ast" default. Malformed TOML or a present-but-invalid parser value is a hard error (:class:ConfigError) naming the file and the problem -- never silently defaulted.

Search