mirror of
https://github.com/ludo-technologies/pyscn.git
synced 2025-10-06 00:59:45 +03:00
de7c51ea8b026daf5db76071834acd41bfa1c8bd
Remove all deprecated individual command implementations (complexity, deadcode, clone, cbo, deps) in preparation for the 1.0.0 stable release. All functionality is preserved through the unified `pyscn analyze --select <analysis>` command. Breaking Changes: - Removed `pyscn complexity` command - Removed `pyscn deadcode` command - Removed `pyscn clone` command - Removed `pyscn cbo` command - Removed `pyscn deps` command Migration: - Use `pyscn analyze --select complexity .` instead of `pyscn complexity .` - Use `pyscn analyze --select deadcode .` instead of `pyscn deadcode .` - Use `pyscn analyze --select clones .` instead of `pyscn clone .` - Use `pyscn analyze --select cbo .` instead of `pyscn cbo .` - Use `pyscn analyze --select deps .` instead of `pyscn deps .` Implementation Details: - Deleted deprecated command files: complexity_clean.go, dead_code.go, clone.go, cbo.go, deps.go, clone_config_wrapper.go - Refactored check.go to use use cases directly instead of deleted command wrappers - Removed command registrations from main.go - Deleted associated E2E tests: complexity_e2e_test.go, dead_code_e2e_test.go, clone_e2e_test.go - Removed unused helper function from e2e/helpers.go - Added .golangci.yml to suppress SA5011 false positives in test files - Updated CHANGELOG.md with 1.0.0 breaking changes section Rationale: This breaking change is made during the beta period (v0.x.x) to: - Eliminate redundant command interfaces and reduce maintenance burden - Provide a single, consistent way to run analyses - Simplify documentation and reduce user confusion - Clean up the codebase before the stable 1.0.0 release All tests pass, build succeeds, and lint checks pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
chore: prepare for public repo\n\n- Remove tracked binaries and embedded venv\n- Add SECURITY.md and CODE_OF_CONDUCT.md\n- Update .gitignore to prevent binaries/env from reappearing\n- Fix Makefile to use pyscn module and binary\n- Align CONTRIBUTING links with ludo-technologies/pyscn\n- Update README distribution note (#75)
chore: prepare for public repo\n\n- Remove tracked binaries and embedded venv\n- Add SECURITY.md and CODE_OF_CONDUCT.md\n- Update .gitignore to prevent binaries/env from reappearing\n- Fix Makefile to use pyscn module and binary\n- Align CONTRIBUTING links with ludo-technologies/pyscn\n- Update README distribution note (#75)
chore: prepare for public repo\n\n- Remove tracked binaries and embedded venv\n- Add SECURITY.md and CODE_OF_CONDUCT.md\n- Update .gitignore to prevent binaries/env from reappearing\n- Fix Makefile to use pyscn module and binary\n- Align CONTRIBUTING links with ludo-technologies/pyscn\n- Update README distribution note (#75)
chore: prepare for public repo\n\n- Remove tracked binaries and embedded venv\n- Add SECURITY.md and CODE_OF_CONDUCT.md\n- Update .gitignore to prevent binaries/env from reappearing\n- Fix Makefile to use pyscn module and binary\n- Align CONTRIBUTING links with ludo-technologies/pyscn\n- Update README distribution note (#75)
pyscn - Python Code Quality Analyzer
pyscn is an intelligent Python code quality analyzer that performs deep structural analysis to help you write cleaner, more maintainable code.
What Can It Do For You?
- 🔍 Find Complex Code - Identify functions that are hard to test and maintain
- 🧹 Remove Dead Code - Detect unreachable code that clutters your codebase
- 📋 Detect Duplicates - Find copy-pasted code for refactoring opportunities
- 🔗 Analyze Dependencies - Understand module relationships and coupling
- 📊 Validate Architecture - Ensure your code follows architectural patterns
- 📈 Generate Reports - Export findings in HTML, JSON, YAML, or CSV
Quick Start
# Run analysis without installation
uvx pyscn analyze .
# or
pipx run pyscn analyze .
Common Commands
pyscn analyze
Run comprehensive analysis with HTML report
pyscn analyze . # All analyses with HTML report
pyscn analyze --json . # Generate JSON report
pyscn analyze --select complexity . # Only complexity analysis
pyscn analyze --select deps . # Only dependency analysis
pyscn analyze --select complexity,deps,deadcode . # Multiple analyses
pyscn check
Fast CI-friendly quality gate
pyscn check . # Quick pass/fail check
pyscn check --max-complexity 15 . # Custom thresholds
pyscn init
Create configuration file
pyscn init # Generate .pyscn.toml
💡 Run
pyscn --helporpyscn <command> --helpfor complete options
Configuration
Create a .pyscn.toml file or add [tool.pyscn] to your pyproject.toml:
# .pyscn.toml
[complexity]
max_complexity = 15
[dead_code]
min_severity = "warning"
[output]
directory = "reports"
⚙️ Run
pyscn initto generate a full configuration file with all available options
Installation
# Install with pipx (recommended)
pipx install pyscn
# Or run directly with uvx
uvx pyscn
Alternative installation methods
Build from source
git clone https://github.com/ludo-technologies/pyscn.git
cd pyscn
make build
Go install
go install github.com/ludo-technologies/pyscn/cmd/pyscn@latest
CI/CD Integration
# .github/workflows/code-quality.yml
name: Code Quality
on: [push, pull_request]
jobs:
quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install pyscn
- name: Quick quality check
run: pyscn check .
- name: Generate detailed report
run: pyscn analyze --json --select complexity,deadcode,deps src/
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: code-quality-report
path: .pyscn/reports/
Documentation
📚 Development Guide • Architecture • Testing
License
MIT License — see LICENSE
Built with ❤️ using Go and tree-sitter
Description
pyscn - An Intelligent Python Code Quality Analyzer
architecture-analysisclone-detectioncode-complexitydead-code-detectiondependency-analysispythonstatic-analysis
Readme
MIT
13 MiB
Languages
Go
97.3%
Shell
2.2%
Makefile
0.3%
Python
0.2%