Skip to content

Commit 397c2db

Browse files
committed
straggler
1 parent 6fc7d53 commit 397c2db

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

PLAN.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
# Pylint Report Refactoring Plan
22

3-
This document outlines the plan to refactor and improve the `pylint_report.py` script and its associated tests. Each item in this list represents an atomic change that can be committed individually.
3+
This document outlines the plan to refactor and improve the `pylint.yml` workflow.
44

5-
1. **Refactor for Testability**: Modify `pylint_report.py` to remove calls to `sys.exit()` from all functions except `main()`. Functions should raise exceptions instead, making them easier to test.
6-
7-
2. **Expand Test Coverage**: Add comprehensive unit tests for `pylint_report.py` to `tests/test_pylint_report.py`. This includes testing file I/O operations (with mocking), report parsing logic, and HTML generation.
8-
9-
3. **Create Shared Utilities**: Create a new module `src/rattlesnake/cicd/cicd_utils.py` and move the `get_score_color` function into it. Update `pylint_report.py` and `pylint_badge_color.py` to use this shared function.
10-
11-
4. **Switch to JSON Input**: Modify the `.github/workflows/pylint.yml` workflow to have `pylint` generate a JSON report. This provides a more stable and machine-readable input format.
12-
13-
5. **Refactor to Parse JSON**: Update `pylint_report.py` to parse the JSON report instead of the raw text output. This will simplify the parsing logic and make it more robust against changes in `pylint`'s text formatting.
14-
15-
6. **Update Tests for JSON**: Modify the tests in `tests/test_pylint_report.py` to use sample JSON data as fixtures, aligning them with the new JSON-based parsing approach.
16-
17-
7. **Optimize Regular Expressions**: Pre-compile the regular expressions used in the script to improve performance and code clarity.
18-
19-
8. **Final Code Cleanup**: Perform a final review of the code, add or update docstrings, and ensure all changes adhere to the project's coding standards.

0 commit comments

Comments
 (0)