Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Bump jfmengels/elm-review-simplify from 2.0.15 to 2.0.18 #22

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 15, 2022

Bumps jfmengels/elm-review-simplify from 2.0.15 to 2.0.18.

Changelog

Sourced from jfmengels/elm-review-simplify's changelog.

[2.0.18] - 2022-08-14

Improves the error message for some simplifications.

[2.0.17] - 2022-08-14

Removal of unreachable if branches #31

Simplify now has the ability to infer values from if conditions, which it will use to simplify boolean expressions and even to remove some if branches.

if a && b then
  if a then -- we know this must be true
    1
  else -- so we can remove this else
    2
else
  3

It should also be able to catch things like

if x == 1 then
  if x == 2 then -- we know this must be false
    ...

Can some people try it out, and see whether the tool is wrong in some cases, or what it doesn't catch? (and we'll see if I can add support for those)

Note that this will (purposefully) only simplify boolean expressions by what has been inferred from conditions. Therefore, the following will not be simplified. The reasoning behind the decision is that you would not be able to write code like below, which can be useful if you want to rely on top-level constants that you may wish to change at a later point in time.

enableDevMode = False
value =
if enableDevMode then

Simplifications

The rule now simplifies:

  • (a < b) == (b > a) to True
  • (a <= b) == (b >= a) to True
  • (a && b) == (b && a) to True
  • (a || b) == (b || a) to True
  • Dict.member x Dict.empty to False

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR 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 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 [jfmengels/elm-review-simplify](https://github.com/jfmengels/elm-review-simplify) from 2.0.15 to 2.0.18.
- [Release notes](https://github.com/jfmengels/elm-review-simplify/releases)
- [Changelog](https://github.com/jfmengels/elm-review-simplify/blob/main/CHANGELOG.md)
- [Commits](jfmengels/elm-review-simplify@2.0.15...2.0.18)

---
updated-dependencies:
- dependency-name: jfmengels/elm-review-simplify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants