-
-
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
Changes from all commits
362873f
65b2e4f
7955f62
b1fce46
30d39a8
fb49850
216f6ec
b58d653
470afe9
bbac0fe
e108619
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 commentThe 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. |
||
|
|
||
| //DESCRIPTION jabkit - mange BibTeX files using JabRef | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 commentThe 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. |
||
|
|
||
| //DESCRIPTION jabls - start a bibtex languageserver | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| //DESCRIPTION jabsrv - serve BibTeX files using JabRef | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 commentThe 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. |
||
|
|
||
| //JAVA 24 | ||
| //RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,8 +95,8 @@ public AiChatComponent(AiService aiService, | |
| aiService.getIngestionService().ingest(name, ListUtil.getLinkedFiles(entries).toList(), bibDatabaseContext); | ||
|
|
||
| ViewLoader.view(this) | ||
| .root(this) | ||
| .load(); | ||
| .root(this) | ||
| .load(); | ||
| } | ||
|
|
||
| @FXML | ||
|
|
@@ -215,10 +215,11 @@ private List<Notification> updateNotificationsForEntry(BibEntry entry) { | |
|
|
||
| entry.getFiles().stream().map(file -> aiService.getIngestionService().ingest(file, bibDatabaseContext)).forEach(ingestionStatus -> { | ||
| switch (ingestionStatus.getState()) { | ||
| case PROCESSING -> notifications.add(new Notification( | ||
| Localization.lang("File %0 is currently being processed", ingestionStatus.getObject().getLink()), | ||
| Localization.lang("After the file is ingested, you will be able to chat with it.") | ||
| )); | ||
| case PROCESSING -> | ||
| notifications.add(new Notification( | ||
|
Comment on lines
+218
to
+219
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| Localization.lang("File %0 is currently being processed", ingestionStatus.getObject().getLink()), | ||
| Localization.lang("After the file is ingested, you will be able to chat with it.") | ||
| )); | ||
|
|
||
| case ERROR -> { | ||
| assert ingestionStatus.getException().isPresent(); // When the state is ERROR, the exception must be present. | ||
|
|
@@ -229,7 +230,8 @@ private List<Notification> updateNotificationsForEntry(BibEntry entry) { | |
| )); | ||
| } | ||
|
|
||
| case SUCCESS -> { } | ||
| case SUCCESS -> { | ||
| } | ||
| } | ||
| }); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,7 @@ | |
| * about possible problems with entries (because that will affect LLM output), but on the other hand the user would | ||
| * like to chat with all available entries in the group, even if some of them are not valid. | ||
| */ | ||
| public record Notification(String title, String message) { } | ||
| public record Notification( | ||
| String title, | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| String message) { | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,8 @@ public PersonNameStringConverter(AutoCompletePreferences preferences) { | |
| public String toString(Author author) { | ||
| if (autoCompLF) { | ||
| switch (autoCompleteFirstNameMode) { | ||
| case ONLY_ABBREVIATED, BOTH: | ||
| case ONLY_ABBREVIATED, | ||
| BOTH: | ||
|
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| return author.getFamilyGiven(true); | ||
| case ONLY_FULL: | ||
| return author.getFamilyGiven(false); | ||
|
|
@@ -51,7 +52,8 @@ public String toString(Author author) { | |
| } | ||
| if (autoCompFF) { | ||
| switch (autoCompleteFirstNameMode) { | ||
| case ONLY_ABBREVIATED, BOTH: | ||
| case ONLY_ABBREVIATED, | ||
| BOTH: | ||
| return author.getGivenFamily(true); | ||
| case ONLY_FULL: | ||
| return author.getGivenFamily(false); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.