lint

Introduction

lint runs Ruff over the code of your workspace. Without options it only reports, and --fix fixes and reformats. It exits 2 when a check fails, so it fits a CI pipeline.

splent lint

It ends with ✔️ All checks passed. or ✖ Some checks failed.


Fixing what it finds

splent lint --fix

It runs ruff check --fix and ruff format. Without --fix it runs ruff check and ruff format --check, which change nothing.


Linting part of the workspace

splent lint --target cli
splent lint --fix --target app --target features

--target limits the run, and you can repeat it. Without it every target runs.

Target Path
cli The workspace checkout of the CLI, splent_cli/src/splent_cli, never an installed package
framework splent_framework/src/splent_framework
app The selected product, <product>/src/<product>
features Every editable feature at the workspace root (splent_feature_*/ with a pyproject.toml). Pinned features in .splent_cache are never linted

A target whose folder is missing is skipped. When none is left it fails with No valid target directories found.


Reference

Option Description
--fix Fix lint issues and reformat
--target cli, framework, app or features. Repeatable. All by default

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es