A code formatter for Julia with rules set in stone.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fredrik Ekre
c489dfcaa5
Format spaces around assignment
This patch generalizes the `spaces_around_operators` pass to
`spaces_around_x` and uses it for both operators and assignment.
The new `spaces_around_assignments` matches a lot of things:
- regular assignment (`a=b` -> `a = b`, `a+=b` -> `a += b`,
`a=+b` -> `a = + b`)
- dotted assignment (`a.=b` -> `a .= b`, `a.+=b` -> `a .+= b`,
`a.=+b` -> `a .= + b`)
- keywords in function definitions and at callsites
(`f(x=1) = x` -> f(x = 1)`, `g(x=1)` -> `g(x = 1)`).
- named tuples (`(x=1, y=2)` -> `(x = 1, y = 2)`)
- etc...
|
2 years ago |
| .. |
|
runtests.jl
|
Format spaces around assignment
|
2 years ago |