Repository navigation
chore: add pre-commit configuration and various linting settings for improved code quality - #19
Conversation
…improved code quality
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This pull request introduces a standardized linting and formatting setup across the codebase, aligning with OctoPrint core and plugin best practices. It adds configuration files for tools like
pre-commit,isort,prettier, anddjlint, and updates the CI workflow to usepre-commitfor linting. Minor code cleanups and translation improvements are also included.Linting and Formatting Standardization:
.pre-commit-config.yamlto define a consistent set of linting and formatting hooks (including Ruff, isort, djlint, codespell, prettier, and shellcheck) for local and CI use..isort.cfg,.prettierrc.yaml,.prettierignore, and.djlintrcto configure import sorting, code formatting, and template linting across the project. [1] [2] [3] [4]pyproject.tomlto usepre-commitinstead ofruffin the development dependencies.CI Workflow Improvements:
rufftopre-commit, removed manual Node/ShellCheck setup, and improved Codacy coverage upload handling. [1] [2] [3] [4] [5]Developer Experience:
README.mdto instruct developers to install pre-commit hooks for consistent local linting and formatting.Code and Template Cleanups:
Editor and Linter Config Updates:
.editorconfigto remove the Python-specific max line length setting, unifying formatting rules.