Skip to content

Conversation

@YanxuanLiu
Copy link
Collaborator

enable shellcheck and fix existed issues

Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>

# if num_rows=1m => output_files=50, scale linearly
output_num_files=$(( ( $num_rows * $num_cols + 3000 * 20000 - 1 ) / ( 3000 * 20000 ) ))
output_num_files=$(( ( num_rows * num_cols + 3000 * 20000 - 1 ) / ( 3000 * 20000 ) ))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix note: $/${} is unnecessary on arithmetic variables. [SC2004]

python $gen_data_script classification \
--n_informative $( expr $num_cols / 3 ) \
--n_redundant $( expr $num_cols / 3 ) \
--n_informative $(( num_cols / 3 )) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix note: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. [SC2003]

Signed-off-by: YanxuanLiu <[email protected]>
MODE=${1:-all}
shift
EXTRA_ARGS=$@
EXTRA_ARGS=("$@")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix warning: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. [SC2124]

Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
@@ -1,4 +1,5 @@
# Copyright (c) 2024, NVIDIA CORPORATION.
#!/bin/bash
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix error: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. [SC2148]

while [[ $status != "TERMINATED" ]] && [[ $status != "ERROR" ]]; do
echo -n "."
if [[ $TIME_LIMIT != "" ]] && (( $duration > $TIME_LIMIT ))
if [[ $TIME_LIMIT != "" ]] && (( duration > TIME_LIMIT ))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix note: $/${} is unnecessary on arithmetic variables. [SC2004]

Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
@YanxuanLiu
Copy link
Collaborator Author

build

@YanxuanLiu YanxuanLiu marked this pull request as ready for review September 24, 2025 08:01
Copilot AI review requested due to automatic review settings September 24, 2025 08:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables shellcheck linting for shell scripts and fixes existing shellcheck violations across the codebase.

  • Adds a GitHub workflow to run shellcheck on shell scripts in pull requests
  • Fixes variable expansion issues by removing $ prefixes in arithmetic expressions
  • Adds proper shebang lines to shell scripts that were missing them
  • Corrects string quoting and array handling issues

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/shell-check.yml Adds shellcheck workflow with excluded error codes
python/tests/discover_gpu.sh Fixes string quoting and updates copyright year
python/run_test.sh Removes unnecessary $ prefixes in arithmetic expressions
python/run_benchmark.sh Fixes array handling, arithmetic expressions, and string quoting
python/benchmark/databricks/*.sh Adds missing shebang lines and fixes arithmetic expressions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@YanxuanLiu
Copy link
Collaborator Author

@eordentlich @rishic3 Could you help to review the changes? Thanks!

Copy link
Collaborator

@eordentlich eordentlich left a comment

Choose a reason for hiding this comment

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

Nice! Can you explain how to run locally before checking things in?

@YanxuanLiu
Copy link
Collaborator Author

Nice! Can you explain how to run locally before checking things in?

The shellcheck Github workflow will run automatically when PR opened, updated, reopened. You don't need to run the check locally.

All the changes of this PR have been verified locally.

@YanxuanLiu YanxuanLiu merged commit a8b3ed1 into NVIDIA:branch-25.10 Sep 26, 2025
4 checks passed
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.

4 participants