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

Add hmftools-chord 2.1.0_beta #51149

Merged
merged 5 commits into from
Oct 9, 2024
Merged

Conversation

scwatts
Copy link
Contributor

@scwatts scwatts commented Oct 4, 2024

Add recipe for hmftools-chord 2.1.0_beta


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Copy link
Contributor

coderabbitai bot commented Oct 4, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces several new components for the hmftools-chord package. A new build.sh script is included, which automates the installation and setup of the CHORD tool in a specified target directory. It creates necessary directories, moves JAR files, installs required R packages, and sets up a shell script for executing the CHORD tool. Additionally, a new shell script named chord.sh is created to facilitate running the CHORD application with appropriate Java settings and command-line arguments. A meta.yaml file is also added, detailing the package's version, source, build requirements, and testing commands. This file specifies dependencies, including R packages and Bioconductor resources, and includes metadata such as the package's homepage and licensing information. The overall changes focus on enhancing the installation and execution processes for the CHORD tool within the hmftools project.

Possibly related PRs

  • Update hmftools-amber to 4.1_beta #51141: Addition of a build.sh script for the CHORD tool, similar to updates made in the hmftools-amber PR involving a meta.yaml file and package versioning.
  • Update hmftools-bam-tools to 1.3_beta #51142: Updates to a meta.yaml file and version changes in the hmftools-bam-tools PR, aligning with changes made in the main PR for the CHORD tool.
  • Add hmftools-peach 2.0.0 #51150: Introduction of the hmftools-peach package, which includes a build.sh script and a meta.yaml file, similar to the structure of the CHORD tool changes.
  • Add hmftools-redux 1.0_beta #51151: The hmftools-redux PR introduces a new build.sh script and a meta.yaml file, paralleling the focus of the main PR on adding new scripts and package metadata for the CHORD tool.

Suggested labels

please review & merge, new version

Suggested reviewers

  • mencian

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b15defb and 9e5f307.

📒 Files selected for processing (2)
  • recipes/hmftools-chord/LICENSE (1 hunks)
  • recipes/hmftools-chord/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/hmftools-chord/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (8)
recipes/hmftools-chord/meta.yaml (7)

1-3: LGTM: Version and checksums are correctly defined.

The version and SHA256 checksums for both JAR and source files are properly set using Jinja2 templating.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


5-7: LGTM: Package name and version are correctly defined.

The package name "hmftools-chord" and version (using the Jinja2 variable) are properly set.


9-15: LGTM: Source URLs and checksums are correctly defined.

The source section properly defines two sources (JAR file and source archive) with correct URLs and SHA256 checksums. Using separate folders for JAR and source is a good practice.


17-21: LGTM: Build configuration is correct.

The build section is properly configured:

  • noarch: generic is appropriate for a Java-based tool.
  • Build number is set to 0.
  • The run_exports section ensures proper version pinning.

23-38: LGTM: Requirements are comprehensive and appropriate.

The requirements section is well-defined:

  • Host and run requirements are properly specified.
  • R packages and Bioconductor resources are correctly included.
  • OpenJDK is set to version >=8, ensuring compatibility.

40-51: LGTM: Test commands and about section are well-defined.

The test and about sections are properly configured:

  • Test commands cover R library checks and CHORD version verification.
  • License information is correctly provided, including the license file.
  • The summary is concise and informative.

Note: The previously raised concern about a missing 'license_file' has been addressed in this version.


1-51: Overall assessment: The meta.yaml file is well-structured and follows best practices.

The meta.yaml file for the hmftools-chord package is correctly configured and includes all necessary sections:

  • Version and checksums are properly defined.
  • Package name and version are correct.
  • Source URLs and checksums are accurately specified.
  • Build configuration is appropriate for a Java-based tool.
  • Requirements are comprehensive and include all necessary dependencies.
  • Test commands cover essential checks.
  • About section provides accurate metadata, including license information.

The file adheres to Conda packaging guidelines and is ready for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

recipes/hmftools-chord/LICENSE (1)

1-624: Excellent addition of the GPL v3 license file.

The inclusion of the GNU General Public License Version 3 is crucial for open-source compliance. The file correctly starts with a copyright notice for Hartwig Medical Foundation (2016-2024) and contains the full, unmodified text of the GPL v3. This ensures that users and contributors are clearly informed about the terms under which the software can be used, modified, and distributed.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@scwatts
Copy link
Contributor Author

scwatts commented Oct 4, 2024

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
noarch hmftools-chord-2.1.0_beta-r43hdfd78af_0.tar.bz2 LinuxArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the LinuxArtifacts directory: conda install -c ./packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
hmftools-chord 2.1.0_beta--r43hdfd78af_0 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/hmftools-chord:2.1.0_beta--r43hdfd78af_0.tar.gz | docker load

@scwatts
Copy link
Contributor Author

scwatts commented Oct 6, 2024

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
noarch hmftools-chord-2.1.0_beta-r43hdfd78af_0.tar.bz2 LinuxArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the LinuxArtifacts directory: conda install -c ./packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
hmftools-chord 2.1.0_beta--r43hdfd78af_0 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/hmftools-chord:2.1.0_beta--r43hdfd78af_0.tar.gz | docker load

@scwatts scwatts marked this pull request as ready for review October 8, 2024 05:18
@scwatts
Copy link
Contributor Author

scwatts commented Oct 8, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 8, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (9)
recipes/hmftools-chord/meta.yaml (6)

9-15: LGTM: Source URLs and checksums are well-defined.

The source section correctly defines URLs for both the JAR file and source tarball, using GitHub release links. The use of Jinja2 templating for version and checksums ensures consistency.

Consider adding a comment explaining the purpose of including both JAR and source files, as it's not common practice in all Conda recipes. This can help future maintainers understand the rationale.


17-21: LGTM: Build section is well-configured.

The build section is correctly configured:

  • noarch: generic is appropriate for a Java-based tool.
  • Build number 0 is correct for a new package.
  • The run_exports section with pinning helps manage dependency versions, as recommended in the PR objectives.

Consider adding a comment explaining the rationale behind the max_pin="x.x" setting in the run_exports section. This can help future maintainers understand the version constraint strategy.


23-38: LGTM: Dependencies are well-defined, but consider optimizing.

The requirements section correctly separates host and run dependencies, including necessary R packages and Bioconductor resources. The Java requirement is appropriately specified.

Consider using YAML anchors and aliases to reduce duplication between host and run requirements. This can make the recipe more maintainable. For example:

requirements:
  _r_deps: &r_deps
    - r-base
    - r-randomforest
    - r-stringr
    - bioconductor-bsgenome
    - bioconductor-bsgenome.hsapiens.ucsc.hg19
    - bioconductor-bsgenome.hsapiens.ucsc.hg38
  host:
    - *r_deps
  run:
    - openjdk >=8
    - *r_deps

This approach reduces redundancy and makes it easier to update dependencies in the future.


40-44: LGTM: Test commands are comprehensive.

The test section includes appropriate commands to verify the installation:

  1. Loading required R libraries
  2. Checking the CHORD tool version

These tests ensure that both R dependencies and the main tool are correctly installed and accessible.

Consider adding a test to verify that the JAR file is present in the expected location. This can be done with a simple file existence check. For example:

test:
  commands:
    - test -f $PREFIX/share/hmftools-chord-{{ version }}/chord-{{ version }}.jar
    # ... existing commands ...

This additional test would ensure that the JAR file is correctly packaged and installed.


46-50: LGTM: About section provides essential metadata.

The about section correctly includes:

  • Home page URL
  • License information (GPL-3.0-only)
  • A concise summary of the tool's functionality

Consider adding a doc_url field pointing to the tool's documentation, if available. This can help users find more detailed information about the tool. For example:

about:
  home: https://github.com/hartwigmedical/hmftools/blob/master/chord/
  doc_url: https://github.com/hartwigmedical/hmftools/blob/master/chord/README.md
  # ... existing fields ...

This addition would provide users with quick access to the tool's documentation.


1-1: Note: Ignore yamllint warning about '%' character

The yamllint tool reported a syntax error for the '%' character at the beginning of the file. This is a false positive, as the '%' is part of the Jinja2 templating syntax commonly used in Conda recipes.

If you want to suppress this warning in future linting, you can add a # yamllint disable-line rule:document-start comment at the beginning of the file. However, this is generally not necessary for Conda recipes, as the Conda build system correctly interprets the Jinja2 syntax.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

recipes/hmftools-chord/chord.sh (3)

1-20: LGTM with a minor suggestion for improvement

The script setup and environment configuration look good. The error handling and symlink resolution are well implemented. However, there's a minor improvement we can make to the ENV_PREFIX calculation to handle paths with spaces more robustly.

Consider updating line 19 to use quotes:

-ENV_PREFIX="$(dirname $(dirname $DIR))"
+ENV_PREFIX="$(dirname "$(dirname "$DIR")")"

This change ensures that the dirname commands handle paths with spaces correctly.

🧰 Tools
🪛 Shellcheck

[warning] 19-19: Quote this to prevent word splitting.

(SC2046)


21-28: LGTM with a suggestion for additional validation

The Java executable selection logic is flexible and allows for system-specific installations. However, we can improve it by adding validation for the selected Java executable.

Consider adding a check to ensure the selected Java executable exists and is the correct version:

 if [ -n "${JAVA_HOME:=}" ]; then
   if [ -e "$JAVA_HOME/bin/java" ]; then
       java="$JAVA_HOME/bin/java"
   fi
 fi
+
+# Validate Java executable
+if ! command -v "$java" &> /dev/null; then
+    echo "Error: Java executable not found" >&2
+    exit 1
+fi
+
+# Check Java version (adjust version number as needed)
+if ! "$java" -version 2>&1 | grep -q "version \"1.8"; then
+    echo "Error: Java 8 is required" >&2
+    exit 1
+fi

This addition ensures that the script fails early if the Java executable is not found or if it's not the correct version.


30-60: LGTM with a minor improvement for argument handling

The argument processing logic is well-implemented, handling different types of arguments correctly and using quotes to preserve special characters. However, we can make a small improvement to address a potential word splitting issue.

To address the static analysis warning and improve robustness, consider using an array to store the processed arguments:

-pass_args=""
+declare -a pass_args=()
 for arg in "$@"; do
     case $arg in
         '-D'*)
             jvm_prop_opts="$jvm_prop_opts $arg"
             ;;
         '-XX'*)
             jvm_prop_opts="$jvm_prop_opts $arg"
             ;;
          '-Xm'*)
             jvm_mem_opts="$jvm_mem_opts $arg"
             ;;
          *)
-	    if [[ ${pass_args} == '' ]] #needed to avoid preceeding space on first arg e.g. ' MarkDuplicates'
-            then
-                pass_args="$arg"
-	    else
-                pass_args="$pass_args \"$arg\"" #quotes later arguments to avoid problem with ()s in MarkDuplicates regex arg
-            fi
+            pass_args+=("$arg")
             ;;
     esac
 done

This change ensures that all arguments are properly quoted and prevents potential issues with word splitting or globbing.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e9865fd and b15defb.

📒 Files selected for processing (3)
  • recipes/hmftools-chord/build.sh (1 hunks)
  • recipes/hmftools-chord/chord.sh (1 hunks)
  • recipes/hmftools-chord/meta.yaml (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/hmftools-chord/build.sh

[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

recipes/hmftools-chord/chord.sh

[warning] 19-19: Quote this to prevent word splitting.

(SC2046)


[warning] 62-62: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.

(SC2206)

🪛 yamllint
recipes/hmftools-chord/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (7)
recipes/hmftools-chord/build.sh (4)

3-5: LGTM: Directory setup looks good.

The script correctly sets up the target directory using environment variables and creates necessary directories. This approach ensures flexibility and follows best practices.


9-10: ⚠️ Potential issue

Add error handling and directory checks for R package installation.

Consider adding error handling and directory checks for the R package installations:

+for dir in src/chord/src/main/R/mutSigExtractor src/chord/src/main/R/CHORD; do
+    if [ ! -d "$dir" ]; then
+        echo "Error: $dir not found" >&2
+        exit 1
+    fi
+    ${R} CMD INSTALL --build "$dir" || { echo "Error installing $dir" >&2; exit 1; }
+done
-${R} CMD INSTALL --build src/chord/src/main/R/mutSigExtractor
-${R} CMD INSTALL --build src/chord/src/main/R/CHORD

This change will ensure that the required directories exist and that any installation failures are caught and reported.

To verify the existence of the R package source directories, you can run:

#!/bin/bash
# Description: Check for the presence of R package source directories
# Expected result: Both R package source directories should exist

# Test: Search for R package source directories
fd -t d '(mutSigExtractor|CHORD)$' recipes/hmftools-chord

12-13: ⚠️ Potential issue

Add error handling and file checks for final setup operations.

Consider adding error handling and file checks for the final setup operations:

+if [ ! -f "$RECIPE_DIR/chord.sh" ]; then
+    echo "Error: $RECIPE_DIR/chord.sh not found" >&2
+    exit 1
+fi
-cp $RECIPE_DIR/chord.sh $TGT/chord
+cp $RECIPE_DIR/chord.sh $TGT/chord || { echo "Error copying chord.sh" >&2; exit 1; }
-ln -s $TGT/chord ${PREFIX}/bin/
+ln -s $TGT/chord ${PREFIX}/bin/ || { echo "Error creating symbolic link" >&2; exit 1; }

These changes ensure that the required files exist and that any operation failures are caught and reported.

To verify the existence of the chord.sh file in the recipe directory, you can run:

#!/bin/bash
# Description: Check for the presence of chord.sh in the recipe directory
# Expected result: The chord.sh file should exist in the recipe directory

# Test: Search for chord.sh in the recipe directory
fd -t f '^chord.sh$' recipes/hmftools-chord

7-8: ⚠️ Potential issue

Improve error handling for directory changes and file operations.

  1. The cd command should handle potential failures:
-cd "${SRC_DIR}"
+cd "${SRC_DIR}" || exit 1
  1. Consider adding a check for the existence of the jar/ directory:
+if [ ! -d "jar" ]; then
+    echo "Error: jar/ directory not found" >&2
+    exit 1
+fi
 mv jar/chord*.jar $TGT/chord.jar

These changes will make the script more robust and easier to debug if issues occur.

To verify the existence of the jar/ directory in the source package, you can run:

🧰 Tools
🪛 Shellcheck

[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

recipes/hmftools-chord/meta.yaml (2)

1-3: LGTM: Version and checksums are properly defined.

The version is correctly set to "2.1.0_beta", following semantic versioning for pre-release software. The inclusion of SHA256 checksums for both JAR and source files is a good practice for ensuring file integrity.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


5-7: LGTM: Package name and version are correctly defined.

The package name "hmftools-chord" is appropriate, and the version is correctly referenced using Jinja2 templating, ensuring consistency with the earlier definition.

recipes/hmftools-chord/chord.sh (1)

69-69: LGTM: Script conclusion

The explicit exit command at the end of the script is fine. While not strictly necessary, it clearly indicates the intended end of the script execution and can be helpful for readability.

Comment on lines +62 to +68
pass_arr=($pass_args)
if [[ ${pass_arr[0]:=} == com.hartwig.* ]]
then
eval "$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/chord.jar" $pass_args
else
eval "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chord.jar" $pass_args
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Improve command execution for better security and robustness

While the logic for determining how to execute the Java command is sound, there are some security and robustness concerns in this section.

  1. The use of eval can be dangerous if the inputs are not properly sanitized. Consider removing eval and using arrays for argument handling.

  2. The word splitting warning on line 62 should be addressed.

Here's a suggested refactor to address these issues:

-pass_arr=($pass_args)
-if [[ ${pass_arr[0]:=} == com.hartwig.* ]]
+if [[ ${pass_args[0]:=} == com.hartwig.* ]]
 then
-    eval "$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/chord.jar" $pass_args
+    "$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/chord.jar" "${pass_args[@]}"
 else
-    eval "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chord.jar" $pass_args
+    "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chord.jar" "${pass_args[@]}"
 fi

This refactored version:

  1. Removes the use of eval, improving security.
  2. Uses the array directly, avoiding word splitting issues.
  3. Properly expands the pass_args array using "${pass_args[@]}".

These changes make the script more secure and robust against potential injection attacks or unexpected behavior with special characters in arguments.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pass_arr=($pass_args)
if [[ ${pass_arr[0]:=} == com.hartwig.* ]]
then
eval "$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/chord.jar" $pass_args
else
eval "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chord.jar" $pass_args
fi
if [[ ${pass_args[0]:=} == com.hartwig.* ]]
then
"$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/chord.jar" "${pass_args[@]}"
else
"$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chord.jar" "${pass_args[@]}"
fi
🧰 Tools
🪛 Shellcheck

[warning] 62-62: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.

(SC2206)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants