rlsbl v0.40.1 /rlsbl.lint
On this page

Library boundary linter spanning Python, Go, and npm that flags accidental external exposure of internal symbols so public APIs stay deliberate.

#rlsbl.lint

#rlsbl.lint

Multi-language library boundary linter that detects accidental external exposure of internal symbols across Python, Go, and npm libraries to keep public APIs clean and intentional.

Public API: lint_library(project_path) -> list[LintResult] scan_imports(project_path) -> set[tuple[str, str, int]] LintResult (namedtuple: file, line, rule, severity, message)

#_detect_languages

python
def _detect_languages(project_path: str) -> list[str]

Detect which languages are present in the project.

#_create_linter

python
def _create_linter(language: str, parser_type: str)

Create the appropriate linter instance for a language and parser type.

#_create_import_scanner

python
def _create_import_scanner(language: str)

Create an AST-based import scanner for a language.

Import scanning always uses the AST parser (not regex) since it needs accurate import extraction.

#lint_library

python
def lint_library(project_path: str) -> list[LintResult]

Analyze a project for library boundary violations.

Detects languages present in the project, loads per-language config, and runs the appropriate linter for each.

Args:

  • project_path: path to the project root directory.

Returns a list of LintResult namedtuples.

#scan_imports

python
def scan_imports(project_path: str) -> set[tuple[str, str, int]]

Collect all imports from source files in a project.

Detects languages present and uses AST-based scanners to extract every import statement found.

Args:

  • project_path: path to the project root directory.

Returns a set of (package_name, file_path, line_number) tuples.