Skip to content
New issue

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

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

Already on GitHub? # to your account

Restoration of the formatter for KEY files #3494

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

wadoon
Copy link
Member

@wadoon wadoon commented Jul 6, 2024

Archeology: In the back old days, we reformatted all our KeY files.

If you need to restore a branch before that time to bring it on the master, you should also reformat the KeY files before the merging.

This PR brings the formatter written by Wiesler.

The original MR was !614.

Currently unclear, whether we want to bring this on the main.

Has Sonarqube activated for evaluation reason

  • Missing for main
    • Test cases

@wadoon wadoon requested a review from mattulbrich July 6, 2024 12:28
@wadoon wadoon self-assigned this Jul 6, 2024
@mattulbrich
Copy link
Member

Achieving auto-formatting for .key files would be nice since we have the infrastructure for this ...

Copy link
Member

@mattulbrich mattulbrich left a comment

Choose a reason for hiding this comment

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

There is no documentation / commenting at all.

@wadoon
Copy link
Member Author

wadoon commented Dec 8, 2024

@mattulbrich Looking in the test log shows, that not all KeY files in the repo are parsable anymore.

@KeYProject KeYProject deleted a comment from sonarqubecloud bot Jan 22, 2025
@KeYProject KeYProject deleted a comment from sonarqubecloud bot Jan 22, 2025
@wadoon
Copy link
Member Author

wadoon commented Jan 24, 2025

CodeBuff could be interesting here: https://www.antlr.org/papers/codebuff.pdf

@mattulbrich
Copy link
Member

This PR seems to also touch totally unrelated parts of the code. This is why it should not be merged as is.
Does it make sense to extract the actual formatter code and add that to the code base?

@wadoon
Copy link
Member Author

wadoon commented Feb 23, 2025

This PR seems to also touch totally unrelated parts of the code. This is why it should not be merged as is. Does it make sense to extract the actual formatter code and add that to the code base?

I only see the necessary changes, and a lot of changes that arise by the fact, that the main is running away (spotless indentation changes, etc.)

public class CheckAll {
@TestFactory
public Stream<DynamicTest> checkAllKeYFiles() throws IOException {
var s = Files.walk(Paths.get(".."));
Copy link
Member

Choose a reason for hiding this comment

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

Does this check all .key files in and under the key main directory? That would seem too strict.

@mattulbrich
Copy link
Member

I have added some javadoc to the Wiesler files.
I do not seem to be able to run this. I only get exceptions.
Can we add a README on subproject toplevel explaining what to do.
running gradle produces many exceptions for me. Perhaps I do something wrong.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants