Option C Tools
Loading...
Searching...
No Matches
tests_linter.test_header_fixing Namespace Reference

Functions

 read_lines (Path path)
 test_fix_missing_shebang (Path temp_project_root, oct_lint.LinterContext linter_ctx)
 test_fix_wrong_path_header (Path temp_project_root, oct_lint.LinterContext linter_ctx)

Detailed Description

Purpose
-------
Validate the linter's header auto-fixing logic.

Responsibilities
----------------
- Ensure missing or incorrect header lines are corrected.
- Ensure duplicates and misplaced lines are removed.
- Ensure docstrings and code remain intact.
- Ensure backup files are created.

Diagnostics
-----------
Domain: LINTER-TESTS
Levels:
    L2 — lifecycle
    L3 — semantic details
    L4 — deep tracing

Contracts
---------
- Must not modify fixtures outside the temporary project root.
- Must verify correctness of the rewritten header block.
- Must ensure no corruption of module content.

Function Documentation

◆ read_lines()

tests_linter.test_header_fixing.read_lines ( Path path)

Definition at line 36 of file test_header_fixing.py.

Here is the caller graph for this function:

◆ test_fix_missing_shebang()

tests_linter.test_header_fixing.test_fix_missing_shebang ( Path temp_project_root,
oct_lint.LinterContext linter_ctx )

Definition at line 40 of file test_header_fixing.py.

Here is the call graph for this function:

◆ test_fix_wrong_path_header()

tests_linter.test_header_fixing.test_fix_wrong_path_header ( Path temp_project_root,
oct_lint.LinterContext linter_ctx )

Definition at line 53 of file test_header_fixing.py.

Here is the call graph for this function: