Skip to content

Conversation

@Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented May 25, 2025

Fixes https://github.com/JabRef/jabref-issue-melting-pot/issues/925

TODO: handle null informat

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [.] Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [.] Tests created for changes (if applicable)
  • [.] Manually tested changed features in running JabRef (always required)
  • [.] Screenshots added in PR description (if change is visible to the user)
  • [.] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • [.] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Siedlerchr Siedlerchr marked this pull request as draft May 25, 2025 13:23
/**
* Common method to import a file with a specified format.
*
* @param filePath the path to the file to import
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.javadoc.RequireEmptyLineBeforeBlockTagGroupCheck> reported by reviewdog 🐶
Javadoc tag '@param' should be preceded with an empty line.

public boolean append;

@Parameters(paramLabel = "<FILE>", description = "File to be imported.", arity = "1")
public String inputFile;
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck> reported by reviewdog 🐶
Blank line at end of block should be removed

@Deprecated
record AppendFileOrUrlToCurrentLibrary(String location) implements UiCommand { }

record ImportFileToCurrentLibrary(String filePath, String format) implements UiCommand { }
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck> reported by reviewdog 🐶
Blank line at end of block should be removed

import static picocli.CommandLine.Option;
import static picocli.CommandLine.Parameters;

@Command(name = "import", aliases = {"--import"}, description = "Import bibliography files.")
Copy link

Choose a reason for hiding this comment

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

The command description should be in sentence case, not title case, to maintain consistency with other strings and labels.

@Deprecated
record AppendFileOrUrlToCurrentLibrary(String location) implements UiCommand { }

record ImportFileToCurrentLibrary(String filePath, String format) implements UiCommand { }
Copy link

Choose a reason for hiding this comment

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

The pull request title should contain a short title of the issue fixed or addressed, not just 'Fix issue xyz'. Ensure the title is descriptive of the changes made.

this.startupMode = startupMode;
this.preferences = preferences;
this.guiCli = new GuiCommandLine();
this.importSubCommandCli = new ImportSubCommand();
Copy link
Member

Choose a reason for hiding this comment

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

Why manually? This should be done automatically by the annotations...

private final Mode startupMode;
private final GuiPreferences preferences;
private final GuiCommandLine guiCli;
private final ImportSubCommand importSubCommandCli;
Copy link

Choose a reason for hiding this comment

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

The variable name 'importSubCommandCli' should follow camel-case naming conventions. It should be 'importSubCommandCLI' to maintain consistency with other CLI-related variables.

@Siedlerchr
Copy link
Member Author

Needs some more discussion closing as it is now.

@Siedlerchr Siedlerchr closed this May 29, 2025
@Siedlerchr Siedlerchr deleted the importParameter branch May 29, 2025 17: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.

3 participants