github rohaquinlop/complexipy 3.3.0

latest releases: 4.0.2, 4.0.1, 4.0.0...
one month ago

🎉 complexipy v3.3.0 Release Notes

🚀 New Features

📊 Customizable Complexity Threshold

We're excited to introduce the ability to customize the maximum allowed cognitive complexity threshold per function! You're no longer limited to the hardcoded threshold of 15 points.

✨ What's New

  • New CLI Option: --max-complexity-allowed (short: -mx)
  • Flexible Thresholds: Set any complexity limit that fits your project's needs
  • Backward Compatible: Default remains 15 points to maintain existing behavior
  • GitHub Actions Support: Full integration with the GitHub Action workflow

🛠️ Usage Examples

Command Line:

# Set a stricter threshold
complexipy . --max-complexity-allowed 10

# More lenient for legacy code
complexipy . --max-complexity-allowed 25

# Combine with other options
complexipy ./src --max-complexity-allowed 8 --details low --sort desc

GitHub Actions:

- uses: rohaquinlop/complexipy-action@v1
  with:
    paths: .
    max_complexity_allowed: 12

🎯 Use Cases

  • Strict Quality Standards: Lower thresholds (5-10) for new projects
  • Legacy Code Migration: Higher thresholds (20-30) while gradually improving
  • Team Standards: Align with your organization's complexity guidelines
  • CI/CD Integration: Different thresholds for different environments

📝 Documentation Updates

  • Updated CLI help text and parameter documentation
  • Enhanced README.md with comprehensive usage examples
  • Added GitHub Actions integration examples
  • Updated command-line options reference table

🔧 Technical Details

  • The max_complexity parameter is now configurable via CLI
  • Exit code 1 behavior now respects the custom threshold
  • CSV and JSON outputs include the configured threshold
  • Maintains full backward compatibility

🙏 Acknowledgments

Thank you to the community for requesting this feature! This enhancement makes complexipy more flexible and adaptable to different project requirements.


Full Changelog: Compare changes from v3.2.0...v3.3.0

Don't miss a new complexipy release

NewReleases is sending notifications on new releases.