rohaquinlop / complexipy

An extremely fast Python library to calculate the cognitive complexity of Python files, written in Rust.
https://rohaquinlop.github.io/complexipy/
MIT License
135 stars 7 forks source link

Feature Request: Sort Output by Complexity #27

Closed NiklasvonM closed 7 months ago

NiklasvonM commented 8 months ago

I'd like to propose adding the option to sort the output by the complexity, perhaps via an -s/--sort option.

When analyzing a large project for the first time, this could help finding the worst offenders quickly.

I suggest sorting the complexity in an ascending order by default since one sees the last entries first when printed to the terminal.

rohaquinlop commented 8 months ago

Thank you, @NiklasvonM this is a really useful

rohaquinlop commented 7 months ago

@NiklasvonM This feature is already implemented, will be present in the next release, thank you for your feedback