Skip to content

Bump styler from 1.4.2 to 1.6.0 #57

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 1, 2025

Bumps styler from 1.4.2 to 1.6.0.

Release notes

Sourced from styler's releases.

v1.6.0: ExUnit assertions edition

That's right, a feature release again so soon!

Improvements

This version of Styler adds many readability improvements around ExUnit assert and refute, specifically when working with 1. negations or 2. some Enum stdlib functions.

Some of these rewrites are not semantically equivalent; for example, refute is_nil(false) will be rewritten to assert false, which will fail.

ExUnit assert/refute rewrites

Styler now inverts negated (!, not) assert/refute (eg assert !x => refute x) statements, and further inverts refute with boolean comparison operators (refute x < y => assert x >= y) because non-trivial refutes are harder to reason about [ citation needed ]. Asserting something is not nil is the same as just asserting that something, so that's gone too now.

These changes are best summarized by the following table:

before styled
assert !x refute x
assert not x refute x
assert !!x assert x
assert x != nil assert x
assert x == nil no change
assert is_nil(x) no change
assert !is_nil(x) assert x
assert x not in y refute x in y
refute negated
refute x no change
refute !x assert x
refute not x assert x
refute x != y assert x == y
refute x !== y assert x === y
refute x != nil assert x == nil
refute x not in y assert x in y
refute comparison
refute x < y assert x >= y
refute x <= y assert x > y
refute x > y assert x <= y
refute x >= y assert x < y
  • assert Enum.member?(y, x) -> assert x in y
  • assert Enum.find(x, y) -> assert Enum.any?(x, y) (nb. not semantically equivalent in theory, but equivalent in practice)
  • assert Enum.any?(y, & &1 == x) -> assert x in y
  • assert Enum.any?(y, fn var -> var == x end) -> assert x in y

Fixes

  • alias lifting: fix bug lifting in snippets with a single ast node at the root level (like a credo config file) (#240, h/t @​defndaines)

v1.5.1

Fixes

... (truncated)

Changelog

Sourced from styler's changelog.

1.6.0

That's right, a feature release again so soon!

Improvements

This version of Styler adds many readability improvements around ExUnit assert and refute, specifically when working with 1. negations or 2. some Enum stdlib functions.

Some of these rewrites are not semantically equivalent due to refute passing for both nil and false.

ExUnit assert/refute rewrites

Styler now inverts negated (!, not) assert/refute (eg assert !x => refute x) statements, and further inverts refute with boolean comparison operators (refute x < y => assert x >= y) because non-trivial refutes are harder to reason about [ citation needed ]. Asserting something is not nil is the same as just asserting that something, so that's gone too now.

These changes are best summarized by the following table:

before styled
assert !x refute x
assert not x refute x
assert !!x assert x
assert x != nil assert x
assert x == nil no change
assert is_nil(x) no change
assert !is_nil(x) assert x
assert x not in y refute x in y
refute negated
refute x no change
refute !x assert x
refute not x assert x
refute x != y assert x == y
refute x !== y assert x === y
refute x != nil assert x == nil
refute x not in y assert x in y
refute comparison
refute x < y assert x >= y
refute x <= y assert x > y
refute x > y assert x <= y
refute x >= y assert x < y
  • assert Enum.member?(y, x) -> assert x in y
  • assert Enum.find(x, y) -> assert Enum.any?(x, y) (nb. not semantically equivalent in theory, but equivalent in practice)
  • assert Enum.any?(y, & &1 == x) -> assert x in y
  • assert Enum.any?(y, fn var -> var == x end) -> assert x in y

Fixes

  • alias lifting: fix bug lifting in snippets with a single ast node at the root level (like a credo config file) (#240, h/t @​defndaines)

1.5.1

... (truncated)

Commits
  • 4d6fca6 v1.6.0
  • 0ffe339 fix link in docs
  • 4d8e05b assert Enum.foo rewrites, and tweaks to the negated rewrites
  • d8ea620 rewrite negated assert/refute
  • 51d1cc7 fix: alias lifting snippets with non-block root. closes #240
  • e7a3b81 v1.5.1
  • af740c3 clean up comment - that "bug" isnt a bug
  • 5a01051 fix: comment mangling when lifting aliases in snippets. closes #239
  • be66c30 fix a -> @ typo in module directive "interesting?" check
  • 20954a4 ahem. nothing to see here.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [styler](https://github.com/adobe/elixir-styler) from 1.4.2 to 1.6.0.
- [Release notes](https://github.com/adobe/elixir-styler/releases)
- [Changelog](https://github.com/adobe/elixir-styler/blob/main/CHANGELOG.md)
- [Commits](adobe/elixir-styler@v1.4.2...v1.6.0)

---
updated-dependencies:
- dependency-name: styler
  dependency-version: 1.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from g-andrade August 1, 2025 16:31
@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Aug 1, 2025
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 1, 2025

The reviewers field in the dependabot.yml file will be removed soon. Please use the code owners file to specify reviewers for Dependabot PRs. For more information, see this blog post.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants