In /usr/bin/cdbs-edit-patch line 15:
        $1 == "***" || $1 == "---" \
                                   ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.


In /usr/bin/cdbs-edit-patch line 17:
        /^Index:[ \t]|^diff[ \t]|^==*$|^RCS file: |^retrieving revision [0-9]+(\.[0-9]+)*$/ \
                                                                                            ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.


In /usr/bin/cdbs-edit-patch line 35:
trap "rm -rf $TMP $TMP2" 0 1 2 3 9 11 13 15
             ^--^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.
                  ^---^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.
                                 ^-- SC2173: SIGKILL/SIGSTOP can not be trapped.
                                   ^-- SC2172: Trapping signals by number is not well defined. Prefer signal names.
                                      ^-- SC2172: Trapping signals by number is not well defined. Prefer signal names.


In /usr/bin/cdbs-edit-patch line 43:
ORIGDIR=$(basename $(pwd))
                   ^----^ SC2046: Quote this to prevent word splitting.


In /usr/bin/cdbs-edit-patch line 49:
cp -a . $TMP/$ORIGDIR
        ^--^ SC2086: Double quote to prevent globbing and word splitting.
             ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
cp -a . "$TMP"/"$ORIGDIR"


In /usr/bin/cdbs-edit-patch line 50:
cd $TMP/$ORIGDIR
   ^--^ SC2086: Double quote to prevent globbing and word splitting.
        ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$TMP"/"$ORIGDIR"


In /usr/bin/cdbs-edit-patch line 72:
cp -a . $TMP/$NEWDIR
        ^--^ SC2086: Double quote to prevent globbing and word splitting.
             ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
cp -a . "$TMP"/"$NEWDIR"


In /usr/bin/cdbs-edit-patch line 73:
cd $TMP/$NEWDIR/$deb_srcdir
   ^--^ SC2086: Double quote to prevent globbing and word splitting.
        ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$TMP"/"$NEWDIR"/"$deb_srcdir"


In /usr/bin/cdbs-edit-patch line 77:
    echo -n "Applying already existing patch to edit directory at level"
         ^-- SC2039: In POSIX sh, echo flags are undefined.


In /usr/bin/cdbs-edit-patch line 79:
        echo -n " $level"
             ^-- SC2039: In POSIX sh, echo flags are undefined.


In /usr/bin/cdbs-edit-patch line 103:
SH=$(getent passwd $USER | cut -f 7 -d:)
                   ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
SH=$(getent passwd "$USER" | cut -f 7 -d:)


In /usr/bin/cdbs-edit-patch line 107:
    if [ -f $SRCDIR/debian/patches/$PATCHNAME ]; then
            ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                   ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ -f "$SRCDIR"/debian/patches/"$PATCHNAME" ]; then


In /usr/bin/cdbs-edit-patch line 108:
        cat $SRCDIR/debian/patches/$PATCHNAME | patch_header > $TMP2
            ^-----^ SC2086: Double quote to prevent globbing and word splitting.
            ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                   ^--------^ SC2086: Double quote to prevent globbing and word splitting.
                                                               ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        cat "$SRCDIR"/debian/patches/"$PATCHNAME" | patch_header > "$TMP2"


In /usr/bin/cdbs-edit-patch line 109:
        cat $TMP2 > $SRCDIR/debian/patches/$PATCHNAME
            ^---^ SC2086: Double quote to prevent globbing and word splitting.
                    ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                           ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        cat "$TMP2" > "$SRCDIR"/debian/patches/"$PATCHNAME"


In /usr/bin/cdbs-edit-patch line 111:
    cd $TMP
       ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    cd "$TMP"


In /usr/bin/cdbs-edit-patch line 112:
    diff -Nur -x '*.orig' -x '*~' $ORIGDIR/$deb_srcdir $NEWDIR/$deb_srcdir >> $SRCDIR/debian/patches/$PATCHNAME || [ $? -eq 1 ]
                                  ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                           ^---------^ SC2086: Double quote to prevent globbing and word splitting.
                                                       ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                                               ^---------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                              ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                     ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    diff -Nur -x '*.orig' -x '*~' "$ORIGDIR"/"$deb_srcdir" "$NEWDIR"/"$deb_srcdir" >> "$SRCDIR"/debian/patches/"$PATCHNAME" || [ $? -eq 1 ]


In /usr/bin/cdbs-edit-patch line 116:
	sed -i "s_^\(---\|+++\) [^/]*/build-tree/_\1 _" $SRCDIR/debian/patches/$PATCHNAME
                                                        ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                                                               ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	sed -i "s_^\(---\|+++\) [^/]*/build-tree/_\1 _" "$SRCDIR"/debian/patches/"$PATCHNAME"

For more information:
  https://www.shellcheck.net/wiki/SC2173 -- SIGKILL/SIGSTOP can not be trapped.
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, echo flags are undef...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...