Skip to content

Upgrade plugins and fix new linter errors #185

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged

Conversation

NelsonVides
Copy link
Member

@NelsonVides NelsonVides commented Jun 21, 2025

@paulo-ferraz-oliveira tagging you as I know you were working on the last release of Elvis :)

Copy link

codecov bot commented Jun 21, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lectors/vm/prometheus_vm_system_info_collector.erl 85.71% 1 Missing ⚠️
...eunit/metric/prometheus_quantile_summary_tests.erl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/metrics/prometheus_boolean.erl 93.84% <100.00%> (ø)
...lectors/vm/prometheus_vm_system_info_collector.erl 86.53% <85.71%> (-1.93%) ⬇️
...eunit/metric/prometheus_quantile_summary_tests.erl 98.05% <0.00%> (-0.48%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulo-ferraz-oliveira
Copy link

paulo-ferraz-oliveira commented Jun 21, 2025

Regarding

    [
        {{A, N}, lists:sort(proplists:delete(versions, Props))}
     || A <- Allocators,
        Allocs <- [erlang:system_info({allocator, A})],
        Allocs =/= false,
        {_, N, Props} <- Allocs
    ].

I haven't tested this, but

    [
        {{A, N}, lists:sort(proplists:delete(versions, Props))}
     || A <- Allocators,
        {_, N, Props} <- [erlang:system_info({allocator, A})]
    ].

should work, even if it's less readable (because you lose the filter, which is implicit).

@paulo-ferraz-oliveira
Copy link

Avoiding rules is also a possibility, but I tend not to do it at the project level, but start at the function level. Instead of disable you can always use ignore => [{M, F, A}].

@NelsonVides NelsonVides force-pushed the update_plugins branch 2 times, most recently from 2833cb7 to 4c54547 Compare June 22, 2025 06:10
@NelsonVides
Copy link
Member Author

Ok, went around what the lists are supposed to be and found a different fix, it should be good to go now. Review plis? 🙏🏽😄

@@ -255,8 +255,9 @@ allocators() ->
[
{{A, N}, lists:sort(proplists:delete(versions, Props))}
|| A <- Allocators,
Allocs <- [erlang:system_info({allocator, A})],
Allocs =/= false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hurray. That's what the rule is there for, to make us think about alternatives. If there's none we avoid it, but in this case there was a good solution for us 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I just changed the code to make it more explicit, I find this list comprehension quite a terse hack, and also, what if SMP is disabled for ERTS (why tf would do that but you never know), then the number of allocators would be actually just one and this would return empty. Better make it just explicit, wdyt? :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you changed it. Lemme give it a quick look.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like explicit, yeah; if it works, it works. I just though you were going for minimal change, so the previous one (even if implicit) also worked for me.

@NelsonVides NelsonVides merged commit a1df6ff into master Jun 23, 2025
6 of 7 checks passed
@NelsonVides NelsonVides deleted the update_plugins branch June 23, 2025 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants