Files
pyscn/CHANGELOG.md
DaisukeYoda de7c51ea8b refactor: remove deprecated individual commands for 1.0.0 release
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>
2025-10-03 19:54:35 +09:00

3.8 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.0.0] - TBD

Breaking Changes

  • Removed deprecated individual commands: Removed complexity, deadcode, clone, cbo, and deps commands
    • Migration: Use pyscn analyze --select <analysis> instead
    • Example: pyscn complexity .pyscn analyze --select complexity .
    • Example: pyscn deadcode --min-severity critical .pyscn analyze --select deadcode --min-severity critical .
    • This change simplifies the CLI interface and improves consistency
    • All functionality is preserved through the unified analyze command

Rationale

This breaking change was made during the beta period (v0.x.x) before the 1.0.0 release 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

[0.1.0-beta.13] - 2025-09-08

Latest Beta Release

Note: Previous beta versions (0.1.0-beta.1 through 0.1.0-beta.12) contained distribution issues and have been removed from both PyPI and GitHub releases.

Features

  • Complexity Analysis: CFG-based cyclomatic complexity calculation with risk thresholds

    • McCabe cyclomatic complexity using Control Flow Graph
    • Risk level classification (low/medium/high)
    • Sorting by complexity, risk, or name
    • Configurable thresholds
  • Dead Code Detection: Unreachable code identification

    • Code after return/break/continue/raise statements
    • Unreachable branches detection
    • Severity levels (critical/warning/info)
    • Context display with surrounding lines
  • Clone Detection: APTED algorithm for structural code similarity

    • Type 1-4 clone detection
    • Configurable similarity thresholds (0.0-1.0)
    • Clone grouping and detailed reporting
    • Multiple cost models for tree edit distance
  • CBO Metrics: Coupling Between Objects analysis

    • Class-level coupling measurement
    • Risk level assessment
    • Include/exclude built-ins and imports options
    • Sorting by coupling or name
  • Unified Analysis: Combined reporting across all metrics

    • HTML reports with interactive visualization
    • JSON/YAML/CSV export formats
    • Timestamped output files
    • Health score calculation
  • Configuration System: Flexible configuration management

    • Hierarchical config discovery (project → XDG → home)
    • YAML/JSON config file support
    • Command-line flag overrides
    • Init command for starter config

Performance

  • Fast analysis: 10,000+ lines per second
  • Parallel processing for multiple files
  • Efficient memory usage with streaming parsers
  • Optimized tree-sitter integration

Known Limitations

  • Python 3.10+ features not fully supported:
    • Match statements (PEP 634)
    • Walrus operator (:=) in complex contexts
    • Some async/await patterns
  • System-level structural analysis planned for future release
  • Module dependency graphs not yet implemented

Technical Details

  • Built with Go 1.24+ for optimal performance
  • Clean Architecture with domain/use-case separation
  • Tree-sitter for robust Python parsing
  • Comprehensive test suite (12 packages)
  • Cross-platform support (macOS, Linux, Windows)

Installation

# Install latest beta version
pip install --pre pyscn

# Or specify exact version
pip install pyscn==0.1.0b13

Usage

# Quick quality check
pyscn check .

# Comprehensive analysis
pyscn analyze --html src/

# Individual analyses (use analyze --select)
pyscn analyze --select complexity src/
pyscn analyze --select deadcode src/
pyscn analyze --select clones src/
pyscn analyze --select cbo src/