Problem
The CI pipeline does not enforce code style or formatting standards. This can lead to inconsistent code style across contributions and make the codebase harder to maintain.
Proposed solution
Add linting and formatting checks to the CI pipeline:
- Use
black for code formatting
- Use
isort for import sorting
- Use
flake8 or ruff for linting
- Use
mypy for type checking
- Add pre-commit hooks for local development
Update the CI configuration to include:
- run: pip install black isort flake8 mypy
- run: black --check gcode/
- run: isort --check-only gcode/
- run: flake8 gcode/
- run: mypy gcode/
Add a .pre-commit-config.yaml file for local development.
Alternatives considered
- Using only
black for formatting
- Using
pylint instead of flake8
- Not enforcing any style checks
Problem
The CI pipeline does not enforce code style or formatting standards. This can lead to inconsistent code style across contributions and make the codebase harder to maintain.
Proposed solution
Add linting and formatting checks to the CI pipeline:
blackfor code formattingisortfor import sortingflake8orrufffor lintingmypyfor type checkingUpdate the CI configuration to include:
Add a
.pre-commit-config.yamlfile for local development.Alternatives considered
blackfor formattingpylintinstead offlake8