Commit 6961e36
Upstream merge 1.11.0 (#11)
* ignore no-paren, no-body function heads. closes adobe#185
* minor optimization
* Wrap up 1.0.0 docs overhaul
* 1.0.0
* Add missing documentation. Closes adobe#188
* update readme link
* add more verbiage re styler can add bugs. Closes adobe#186
* reword warning to list examples of breakages
* Update styles.md
Fixed example for "drop superfluous _..."
* Add Stream.run optimizations, fix optimizations shrinking pipes to one line (Closes adobe#180)
* fix infinite loop rewriting negated if with empty do body. closes adobe#196
* Remove unless from codebases (adobe#194)
* use `not` over `!` when rewriting `unless a (> >= < <= in) b`
* actually, lets only do `not` for `in`
* v1.1.0
* update version in readme
* Don't pipe into `Kernel.!` when rewriting unless with pipes
* configs: improve comment handling when moving a small number of nodes. Closes adobe#187
* v1.1.2
* pipes: improve comment behaviour in optimizations (Closes adobe#176)
* One-line unpiped assignments (adobe#197)
Closes adobe#181
* Pipify: `d(a |> b |> c)` => `a |> b() |> c() |> d()`(adobe#198)
Closes adobe#133
* 1.18 hard deprecations (adobe#203)
* `List.zip` => `Enum.zip`
* `first..last = range` => `first..last//_ = range`
* docs and changelog
* docs prep for 1.2
* v1.2.0
* correct docs on Enum.into
* Fix pipifying pipes-in-pipes (Closes adobe#204)
* v1.2.1
* introduce `# styler:sort` comment directive (adobe#205)
closes adobe#167
* styler:sort - handle tuples
* mix format :X
* style:sort - dont dedupe
* docs and fix a typo
* fiddle with private apis to ease iex playing
* remove Zipper.reduce/3 - bugged, but more importantly unused
* Maintain comment-node relations when applying `#styler:sort` directive (adobe#207)
Co-authored-by: Greg Mefford <gmefford@adobe.com>
Closes adobe#167
* v1.3.0
* correct changelog
* fix twople bug in sort directive, add map sorting
* v1.3.1
* defstruct with list literal
* ci: update elixir and erlang versions
* sort directive: sort values of keys. Closes adobe#208
* v1.3.2
* fix comments bug in styler:sort directive
* styler:sort arbitrary ast within do end blocks
* improve `with` statement replacements
* v1.3.3
* alias lifting: shrink when alias already exists. closes adobe#201
* alias lifting: be better about conflicts. Closes adobe#193
* improve alias lift collision case
* remove vestigial with rewriting head
* pipes: handle pipifying functions whose first arg is itself a pipe. closes adobe#193
* cleanup the messes left in the previous commit 🙈
* correct issue number in change log
* test against 1.18
* 1.18 warnings + formatting
* no one saw that right?
* ex1.17+: replace `:timer.units(x)` with the new `to_timeout(unit: x)` for `hours|minutes|seconds`
Closes adobe#218
* 1.18+: change struct updates to map updates. Closes adobe#199
* ensure test works across versions
* fix `with` rewrites when keyword with an else stab (adobe#220)
Closes adobe#219
fixes for both <1.17 and >=1.17
* pipify nested function calls with pipe as the first argument. closes adobe#216
* change struct update deprecation to ex1.19+
* docs docs docs docs docs!
* ship struct update to map update changes after all
* v1.4.0
* Add OTP26/27 but only run for 1.17/1.18
* fix `with` redundant body + non-arrow behind redundant clause. Closes adobe#221
* link to quokka
* rewrite `to_timeout(unit: x * m)` to use larger units in some cases
* defs test describe formatting
* dont crash on invalid defs
* fix CI for older elixir
* v1.4.1
* if: drop empty do bodies. Closes adobe#227
* Fix large comment block mangling bug when ordering sibling AST (adobe#232)
Closes adobe#230
* if: treat is_nil as a negator
* Revert "if: treat is_nil as a negator"
This reverts commit 50ae386.
* Revert "if: drop empty do bodies. Closes adobe#227"
This reverts commit 6b42462.
* v1.4.2
* changelog: fix GH md formatting issues
* optimize zipper performance
* Revert "optimize zipper performance"
This reverts commit e2d4e11.
* fix bug in unpiping syntax-sugared non-atom-valued keyword lists
closes adobe#236
* add `minimum_supported_elixir_version` configuration. closes adobe#231
* Add license preambles to four files
* feat: Apply aliases (adobe#237)
Closes adobe#235
* fix: config sorting mangling floating comment blocks. Closes adobe#230
* styler:sort sorts struct/map based typespec keys. Closes adobe#213
* lift aliases in snippets. closes adobe#189
* inline module attribute
* v1.5.0
* docs updates
* more docs
* ahem. nothing to see here.
* fix a -> @ typo in module directive "interesting?" check
* fix: comment mangling when lifting aliases in snippets. closes adobe#239
* clean up comment - that "bug" isnt a bug
* v1.5.1
* fix: alias lifting snippets with non-block root. closes adobe#240
* rewrite negated assert/refute
* assert Enum.foo rewrites, and tweaks to the negated rewrites
* fix link in docs
* v1.6.0
* cond: standardize on `true` for the literal in the final clause
Co-authored-by: Adam Kittelson <akittelson@adobe.com>
* consolidate config integration tests
* Enum.filter(fun) |> List.first([default]) => Enum.find([default], fun) Closes adobe#242
* update pipes docs
* more pipes docs
* add some preaching around why styler does a weird thing
* v1.7.0
* rewrite single-clause case statements to assignments
* v1.8.0
* to_timeout: rewrite plurals to singulars
* 😍
* one last bit of nerd
* fix :timer.foo regression
* all the work in one spot
* v1.9.0
* add changelog link to hex package
* readme updates
* more readme tweakin
* Fix rewrite of single-clause case statement with assignment parent. Closes adobe#247
* v1.9.1
* optimize Req pipes
* less is more
* tweak intro sentence
* TIL capital sigils cant be escaped
* sort |> reverse => sort(:desc)
* allow docs for Styler.string_to_ast
* Enum.map |> Enum.intersperse => Enum.map_intersperse
* v1.10.0
* bump version in changelog
* pipes docs reorganization
* Add experimental mix styler.remove_unused task
* Add `mix styler.inline_attrs <file>` refactor tool
* v1.10.1
* `mix styler.remove_unused`: allow multiple file args
* readme task link fix
* fix inline_attributes task docs
* module attributes: dont break references from use, moduledoc, etc
* 1.11.0
* A few fixes for v1.11.0
---------
Co-authored-by: Matt Enlow <enlow@adobe.com>
Co-authored-by: Kem Tekinay <ktekinay@mactechnologies.com>
Co-authored-by: Matt Enlow <matt@novaugust.net>
Co-authored-by: Theodor Fiedler <theo.fie@gmail.com>
Co-authored-by: Fabian Becker <fbecker@adobe.com>
Co-authored-by: Adam Kittelson <akittelson@adobe.com>1 parent 463bcb5 commit 6961e36
39 files changed
Lines changed: 2496 additions & 715 deletions
File tree
- docs
- lib
- mix/tasks
- styler
- style
- test
- style
- module_directives
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
1 | 11 | | |
2 | 12 | | |
3 | 13 | | |
| |||
8 | 18 | | |
9 | 19 | | |
10 | 20 | | |
11 | | - | |
| 21 | + | |
12 | 22 | | |
13 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
7 | 253 | | |
8 | 254 | | |
9 | 255 | | |
| |||
0 commit comments