Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylistic refactoring #154

Open
Paalon opened this issue Jun 11, 2024 · 1 comment
Open

Stylistic refactoring #154

Paalon opened this issue Jun 11, 2024 · 1 comment
Labels
documentation Issues / PRs related to documenting functionality enhancement

Comments

@Paalon
Copy link
Contributor

Paalon commented Jun 11, 2024

There are some inconsistent styling in the source code (e.g. indent by 4 spaces vs 1 tab character, etc.). We should use something consistent.

@Paalon
Copy link
Contributor Author

Paalon commented Jun 11, 2024

JuliaFormatter will be fine. I made a configuration for YAML.jl:

# .JuliaFormatter.toml
# Formatting options for the default style supported in JuliaFormatter v1.0.56.
# https://domluna.github.io/JuliaFormatter.jl/stable/

# style = "default"
# indent = 4
# margin = 92
always_for_in = "nothing" # default false
# for_in_replacement = "in"
whitespace_typedefs = true # default false
# whitespace_ops_in_indices = false
remove_extra_newlines = true # default false
# import_to_using = false
# pipe_to_function_call = false
# short_to_long_function_def = false
# long_to_short_function_def = false
# always_use_return = false
whitespace_in_kwargs = false # default true
annotate_untyped_fields_with_any = false # default true
# format_docstrings = false
# align_struct_field = false
# align_assignment = false
# align_conditional = false
align_pair_arrow = true # default false
# conditional_to_if = false
# normalize_line_endings = "auto"
# align_matrix = false
# join_lines_based_on_source = false
trailing_comma = true # default false
# trailing_zero = true
# indent_submodule = false
# separate_kwargs_with_semicolon = false
surround_whereop_typeparameters = false # default true
# variable_call_indent = []
# short_circuit_to_if = false

remove_extra_newlines = true and trailing_comma = true are my preferences. Other options are

  1. to follow the existing YAML.jl's code as far as possible or
  2. defaults of DefaultSyle of JuliaFormatter or
  3. to follow JuliaLang/julia's convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues / PRs related to documenting functionality enhancement
Projects
None yet
Development

No branches or pull requests

2 participants