Skip to content

mix xref --min-cycle-size filters cycles exclusively (> instead of >=) #14474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jechol opened this issue May 7, 2025 · 0 comments · Fixed by #14475
Closed

mix xref --min-cycle-size filters cycles exclusively (> instead of >=) #14474

jechol opened this issue May 7, 2025 · 0 comments · Fixed by #14475

Comments

@jechol
Copy link
Contributor

jechol commented May 7, 2025

Elixir and Erlang/OTP versions

Erlang/OTP 27 [erts-15.2.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.18.3 (compiled with Erlang/OTP 27)

Operating system

macOS 15.4.1

Current behavior

When running mix xref graph --format cycles --min-cycle-size 2, only cycles with length greater than 2 are shown.
This means the filter is effectively applied as cycle length >= 3, which causes confusion, as one would expect cycles of length 2 or more to be included.

Expected behavior

mix xref graph --format cycles --min-cycle-size 2 should include cycles with length greater than or equal to 2.
In other words, the option should be inclusive rather than exclusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant