Skip to content

Automatic code formatting using JuliaFormatter.jl #81

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

Closed
wants to merge 2 commits into from

Conversation

yebai
Copy link
Member

@yebai yebai commented Apr 21, 2020

@codecov
Copy link

codecov bot commented Apr 21, 2020

Codecov Report

Merging #81 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   77.46%   77.46%           
=======================================
  Files          13       13           
  Lines         821      821           
=======================================
  Hits          636      636           
  Misses        185      185           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7159cb...4808c5b. Read the comment docs.

@devmotion
Copy link
Member

I don't have an opinion on this (I've never used JuliaFormatter), it just reminds me of the discussion we had in KernelFunctions about JuliaFormatter. We've decided not to use it since it was not clear how and to what extent it differs from Invenia's BlueStyle and we were afraid of breaking all version history at once (now the objective is to incrementally adopt BlueStyle).

@yebai
Copy link
Member Author

yebai commented Apr 21, 2020

JuliaFormatter provides the option of setting up different styles using a configuration file. Are there any attempts of creating a JuliaFormatter configuration following BlueStyle?

@willtebbutt

@devmotion
Copy link
Member

As far as I can tell, the configuration file only allows to specify the options of format_text listed in the docs, but not a custom style. The only alternative style supported so far seems to be YAS Style.

@yebai
Copy link
Member Author

yebai commented Apr 21, 2020

As far as I can tell, the configuration file only allows to specify the options of format_text listed in the docs, but not a custom style. The only alternative style supported so far seems to be YAS Style.

No problem, happy to stick with the BlueStyle. Let's wait and see whether someone will add BlueStyle in the near future -- it looks relatively straightforward to add BlueStyle to JuliaFormatter, similar to YAS.

@yebai yebai closed this May 13, 2020
@yebai yebai deleted the hg/auto-format branch August 24, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants