Opened 10 months ago

Closed 9 months ago

#28009 closed defect (fixed)

shellcheck: cov-diff issues

Reported by: rl1987 Owned by:
Priority: Medium Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt
Cc: Actual Points:
Parent ID: Points:
Reviewer: asn Sponsor:

Description

Shellcheck (​​​https://github.com/koalaman/shellcheck) finds the following issues:

In cov-diff line 10:
for B in $DIRB/*; do
         ^-- SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In cov-diff line 11:
  A=$DIRA/`basename $B`
          ^-- SC2006: Use $(..) instead of legacy `..`.
                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In cov-diff line 12:
  if [ -f $A ]; then
          ^-- SC2086: Double quote to prevent globbing and word splitting.

Child Tickets

Change History (6)

comment:1 Changed 10 months ago by teor

Keywords: technical-debt added
Milestone: Tor: 0.3.6.x-final

Since these tickets are about technical debt, I'm tentatively putting them in 0.3.6.

To avoid issues like this in future, we could run shellcheck as part of "make check" (#28058).

comment:2 Changed 10 months ago by nickm

Milestone: Tor: 0.3.6.x-finalTor: 0.4.0.x-final

Tor 0.3.6.x has been renamed to 0.4.0.x.

comment:3 Changed 9 months ago by rl1987

Status: newneeds_review

comment:4 Changed 9 months ago by asn

Reviewer: asn

comment:5 Changed 9 months ago by asn

Status: needs_reviewmerge_ready

LGTM!

Please find PR with branch rebased on latest master (where appveyor passes) here:
https://github.com/torproject/tor/pull/519

comment:6 Changed 9 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged!

Note: See TracTickets for help on using tickets.