-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Reformat codebase #13872
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
Reformat codebase #13872
Conversation
|
Lol this was more of a disaster than I presumed |
|
Currently compile errors - I don't understand why they are introduced. Maybe, someone can look based on |
|
This is an alternative to JabRef#717 |
| @@ -1,4 +1,4 @@ | |||
| ///usr/bin/env jbang "$0" "$@" ; exit $? | |||
| /// usr/bin/env jbang "$0" "$@" ; exit $? | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reformatting without adding new statements violates best practices. The change only adds a space after '///' which is purely cosmetic and doesn't improve functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMG - the code formatter -- not that important - we could also remove that line
But maybe, we add this to exceptions
|
The fix of chris was #13817 |
|
Deliberately inserted newlines for readability should somehow be kept:
|
| @@ -1,4 +1,4 @@ | |||
| ///usr/bin/env jbang "$0" "$@" ; exit $? | |||
| /// usr/bin/env jbang "$0" "$@" ; exit $? | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reformatting was done without adding new statements. The addition of a space after '///' is purely syntactical and violates the code reformatting policy.
| @@ -1,4 +1,4 @@ | |||
| ///usr/bin/env jbang "$0" "$@" ; exit $? | |||
| /// usr/bin/env jbang "$0" "$@" ; exit $? | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reformatting without adding new statements violates the principle of meaningful changes. The addition of a space after '///' is purely cosmetic and doesn't improve functionality.
| @@ -1,4 +1,4 @@ | |||
| ///usr/bin/env jbang "$0" "$@" ; exit $? | |||
| /// usr/bin/env jbang "$0" "$@" ; exit $? | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments should add new information and not just restate what's obvious from the code. The shebang line is self-explanatory and doesn't need additional comment formatting.
| case PROCESSING -> | ||
| notifications.add(new Notification( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reformatting with changed indentation is purely cosmetic and doesn't introduce new functionality. Such changes should be combined with actual code modifications.
| public record Notification( | ||
| String title, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code was reformatted without adding new statements. According to guidelines, code should not be reformatted only for syntax reasons without adding new functionality.
| case ONLY_ABBREVIATED, | ||
| BOTH: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is being reformatted without adding new statements, which violates the principle of not reformatting code solely for syntax reasons without functional changes.
| private void cleanup(BibDatabaseContext databaseContext, CleanupPreferences cleanupPreferences) { | ||
| // undo granularity is on entry level | ||
| NamedCompound ce = new NamedCompound(Localization.lang("Cleanup entry")); | ||
| // undo granularity is on entry level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment merely restates what is obvious from the code and variable naming. It does not provide additional information about reasoning or implementation details.
| case EntryChange entryChange -> | ||
| new EntryChangeDetailsView( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code reformatting appears to be purely cosmetic without adding new statements. The indentation and line breaks were modified without functional changes, which violates the reformatting policy.
|
@koppor what do we do about these? |
|
Is @subhramit hidden as commit author to avoid git history misleading bc just reformatting? |
With checkstyle - yes, with intellij auto format configuration - no However, I think in these cases, the formatter just moved */ to the next line, as there was already a * in the line (treating it as a valid comment line) (intended behavior - in a way, so needs manual removal). |
Yes --> #13881 |
|
No lines between methods? jablib/src/test/java/org/jabref/logic/citationkeypattern/BracketedPatternTest.java
|
That's gap between method and csvsource, not method and method |
|
Reason for records reformatting: We began to use records, but did not update our code style. Fixed at #13889 |






























Use IntelliJ reformat with our config xml
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)