Skip to main content

cirron lint

Comprehensive project validation and code quality checking for ML projects: analyzes structure, configuration, dependencies, and code to surface issues and best-practice violations.

Usage

Options

OptionDescriptionDefault
--configLint project configuration (cirron.yaml)false
--structureCheck project structure and filesfalse
--dependenciesValidate requirements.txtfalse
--codeRun code quality checksfalse
--allRun all linting checkstrue
--fixAutomatically fix fixable issuesfalse
--verboseShow detailed suggestionsfalse
--jsonOutput results in JSON formatfalse
--strictTreat warnings as errorsfalse

Validation Rules

CategoryRuleWhat it checksSeverity
configRequired fieldsname, version, template present in cirron.yamlerror
configJSON syntaxValid JSON/YAML structureerror
configVersion formatSemantic versioning compliancewarning
configFramework configFramework-specific requirements (PyTorch needs Python version, TensorFlow GPU flags)warning
configEnvironment setupDeployment environment configurations declaredwarning
structureRequired filessrc/model.py, requirements.txt, Dockerfile existerror
structureOptional filessrc/inference.py, src/data_loader.py, tests/info
structureML directoriesmodels/, data/, checkpoints/, logs/ existwarning
structure.cirronignoreIgnore file presentwarning
dependenciesrequirements.txtFile exists and is parseableerror
dependenciesVersion pinningDependencies have version constraintswarning
dependenciesML librariesDetects common ML libraries (torch, tensorflow, sklearn, numpy, pandas)info
codeTypeScript/JSRuns npm run lint (ESLint)error
codePython syntaxpy_compile on source fileserror
codePython styleLint via flake8/pylint if presentwarning
codeML patternsModel definition follows framework conventionswarning

Automatic Fixes

--fix resolves: missing ML directories (created), missing .cirronignore (generated from a template), ESLint auto-fixable code issues, and basic structural reorganization. The generated .cirronignore template covers .git/, large data files (data/raw/, *.csv), model artifacts (*.pth, *.pkl), dev caches (.vscode/, .idea/, __pycache__/, *.pyc), logs, temp files, and build outputs.

Examples

Example output:
JSON output:

Integration

Troubleshooting

ErrorResolution
npm run lint failedInstall ESLint: npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
Python syntax error in src/model.pypython -m py_compile src/model.py
Missing requirements.txtpip freeze > requirements.txt
Use .cirronignore to exclude large data and model artifacts from linting. Pin dependency versions for reproducible builds and follow framework conventions in src/model.py.