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

test: csdiff#170 #371

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ RUN dnf -y install git koji jq \
RUN koji download-build --arch ${arch} ${rpm_shellcheck} \
&& koji download-build --arch ${arch} ${rpm_csdiff}

RUN dnf -y install "./${rpm_shellcheck}" "./${rpm_csdiff}" \
RUN dnf -y install "./${rpm_shellcheck}" \
&& dnf clean all

RUN dnf install -y dnf-plugins-core \
&& dnf copr enable -y packit/csutils-csdiff-170 \
&& dnf install -y csdiff \
&& dnf clean all

# --- Setup --- #
Expand Down
8 changes: 4 additions & 4 deletions docs/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# Quoting
# =======

# echo $1 # Unquoted variables
echo $1 # Unquoted variables

Check warning

Code scanning / shellcheck

SC2086 Warning documentation

Double quote to prevent globbing and word splitting.
# rm "~/my file.txt" # Quoted tilde expansion
# v='--verbose="true"'; cmd $v # Literal quotes in variables
# touch $@ # Unquoted $@
# echo 'Path is $PATH' # Variables in single quotes
touch $@ # Unquoted $@

Check failure

Code scanning / shellcheck

SC2068 Error documentation

Double quote array expansions to avoid re-splitting elements.
echo 'Path is $PATH' # Variables in single quotes

Check warning

Code scanning / shellcheck

SC2016 Warning documentation

Expressions don't expand in single quotes, use double quotes for that.
# trap "echo Took ${SECONDS}s" 0 # Prematurely expanded trap
# unset var[i] # Array index treated as glob
unset var[i] # Array index treated as glob

Check warning

Code scanning / shellcheck

SC2184 Warning documentation

Quote arguments to unset so they're not glob expanded.

# Conditionals
# ============
Expand Down
Loading