-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
Description
Here are some (hopefully complete) to-dos to make the experimental YASGuide implementation complete, for whomever wishes to work on it. This is the style guide my company uses, so we'd likely adopt JuliaFormatter if it supported it. This guide has a significant amount of overlap with BlueStyle, so adding the functionality outlined below would also increase the ability to support other popular guides. (Indeed, all but a couple of these apply to both YAS and Blue.)
- Require
;to separate positional and keyword arguments - Rewrite
x |> ftof(x) - Align line-broken arguments to the parent opening parenthesis (
format_texterrors for me with function arguments on multiple lines) - Require explicit
returnfor returned values in long form function definitions anddoblocks - Rewrite short form function definitions to long form if the line gets too long
- Expand and paren-wrap arithmetic in indexing expressions (
x[i+1:end]->x[(i + 1):end]) - Rewrite
import Xtousing X - Rewrite
@Module.macrotoModule.@macro - Annotate unannotated fields in type definitions with
::Any - Remove spaces around
=in named tuple literals - Rewrite function definitions inside of other function definitions to be lambdas
domluna and schneiderfelipe