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

More formatter fixes #1851

Merged
merged 11 commits into from
Jun 21, 2023
Merged

More formatter fixes #1851

merged 11 commits into from
Jun 21, 2023

Conversation

petervdonovan
Copy link
Collaborator

@petervdonovan petervdonovan commented Jun 16, 2023

This addresses some issues raised in lf-lang/playground-lingua-franca#48.

  • Usually put the ending delimiter of a list on the same line as the last element of the list
  • Do not always surround = signs with whitespace when they are in parameter lists
  • Resolve the issues with bad wrapping of comments (EDIT: This implements the compromise suggested here.)
  • Convert 4 spaces -> 2 spaces in {= =} code blocks (fixes Two-space indentation #1847)

EDIT: See lf-lang/playground-lingua-franca#50 to view the output of the formatter.

@petervdonovan petervdonovan marked this pull request as ready for review June 20, 2023 21:02
@petervdonovan petervdonovan enabled auto-merge June 20, 2023 21:05
@petervdonovan petervdonovan requested a review from lhstrh June 20, 2023 21:05
@petervdonovan petervdonovan disabled auto-merge June 20, 2023 21:51
@petervdonovan petervdonovan force-pushed the more-more-formatter-fixes branch from 86d0d62 to 300fb84 Compare June 20, 2023 22:20
@petervdonovan petervdonovan marked this pull request as draft June 20, 2023 23:51
@petervdonovan petervdonovan force-pushed the more-more-formatter-fixes branch from e7729d7 to ff2f5e1 Compare June 21, 2023 00:33
@petervdonovan petervdonovan marked this pull request as ready for review June 21, 2023 00:34
@petervdonovan petervdonovan requested a review from cmnrd June 21, 2023 00:35
It is a little embarassing that I almost pushed code that did this to
master. Let us not do that.
@petervdonovan petervdonovan enabled auto-merge June 21, 2023 06:51
Copy link
Collaborator

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! So we now do change the indentation in the target code blocks as well? I guess it is safe most of the time, but I wonder if there might be some corner cases where we could break the target code. I guess we'll find out eventually 😄

@petervdonovan petervdonovan added this pull request to the merge queue Jun 21, 2023
@cmnrd cmnrd removed this pull request from the merge queue due to a manual request Jun 21, 2023
@cmnrd cmnrd added this pull request to the merge queue Jun 21, 2023
@cmnrd cmnrd removed this pull request from the merge queue due to the queue being cleared Jun 21, 2023
@cmnrd cmnrd added this pull request to the merge queue Jun 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 21, 2023
@cmnrd cmnrd added this pull request to the merge queue Jun 21, 2023
Merged via the queue into master with commit 321aacf Jun 21, 2023
@cmnrd cmnrd deleted the more-more-formatter-fixes branch June 21, 2023 13:07
@petervdonovan
Copy link
Collaborator Author

So we now do change the indentation in the target code blocks as well?

No, I did that using find-and- replace, not using the formatter.

@lhstrh lhstrh added the bugfix label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two-space indentation
3 participants