Skip to content

Fix importdirectory command description layout - #6562

Open
efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:codex/issue-6544-import-description
Open

efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:codex/issue-6544-import-description

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

  • Remove the embedded line break from the importdirectory command description so the shell formatter keeps the continuation aligned.
  • Add a regression test covering the description output.

Testing

  • mvn -pl shell -am -Dtest=ImportDirectoryCommandTest -DfailIfNoTests=false -DskipFormat test — passed with Java 21.
  • mvn -pl shell -am -DskipTests -DverifyFormat verify — passed with Java 21.
  • git diff --check — passed.

Fixes #6544

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>

@utafrali utafrali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The fix correctly removes the embedded newline and the regression test properly asserts against the actual newline character. One minor defect: replacing \n with a trailing space introduces a double space where the next concatenated string literal also begins with a space.

+ " will be displayed indicating the source directory is empty, but no error is thrown.\n"
+ " will be displayed indicating the source directory is empty, but no error is thrown. "
+ " Bulk import only takes 2 arguments: <directory> true|false";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The trailing space added here creates a double space when concatenated with the next string literal, which already starts with a space. The result is "...but no error is thrown. Bulk import only takes 2 arguments..." (two spaces before "Bulk"). Drop the trailing space since the following string provides the separator:

+ " will be displayed indicating the source directory is empty, but no error is thrown."

This branch has not been deployed

No deployments
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.

ImportDirectoryCommand description not displaying correctly

2 participants