The formatting of the source code is a bit unusual.
Example: Current code:
function logger(fname::String="WaterLily")
ENV["JULIA_DEBUG"] = all
logger = FormatLogger(ifelse(fname[end-3:end]==".log",fname[1:end-4],fname)*".log"; append=false) do io, args
args.level == _psolver && print(io, args.message)
end;
global_logger(logger);
# put header in file
@log "p/c, iter, r∞, r₂\n"
end
Formatted with Julia Formatter (in VSCode: right click, format document):
function logger(fname::String="WaterLily")
ENV["JULIA_DEBUG"] = all
logger = FormatLogger(ifelse(fname[end-3:end] == ".log", fname[1:end-4], fname) * ".log"; append=false) do io, args
args.level == _psolver && print(io, args.message)
end
global_logger(logger)
# put header in file
@log "p/c, iter, r∞, r₂\n"
end
I find the formatted version easier to read, but your mileage might vary. If the current formatting style is intended, it should be documented in the contribution guidelines (normally, that would be the file CONTRIBUTING.md). Main difference: Spaces around operators, spaces after commas, and no semicolon at the end.
The formatting of the source code is a bit unusual.
Example: Current code:
Formatted with Julia Formatter (in VSCode: right click, format document):
I find the formatted version easier to read, but your mileage might vary. If the current formatting style is intended, it should be documented in the contribution guidelines (normally, that would be the file CONTRIBUTING.md). Main difference: Spaces around operators, spaces after commas, and no semicolon at the end.