Relax Zuul shellcheck lint SC2319 overwrite return value

Bug #2058421 reported by Jim Gauld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
New
Undecided
Jim Gauld

Bug Description

Brief Description
-----------------
Zuul tox job now failing for stx-puppet.

In /home/zuul/src/opendev.org/starlingx/stx-puppet/puppet-manifests/src/bin/apply_network_config.sh line 374:
        upgr_bootstrap=$?
                       ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

Possible fixes:
* Modify the problematic shell code apply_network_config.sh . (not great, the code isn't that bad)
This open review addresses this specifically.
  https://review.opendev.org/c/starlingx/stx-puppet/+/910257

* Pin the shellcheck version:
  passes with: shellcheck-py-0.9.0.6
  fails with: shellcheck-py-0.10.0.1

* Relax the specific checks that are failing:
  # shellcheck disable=SC2119,SC2120
  or, -eSC2319

Severity
--------
Critical: Prevents code submission.

Steps to Reproduce
------------------
Update stx-puppet with a patchset.

Expected Behavior
------------------
Previous codebase should pass existing linters.

Actual Behavior
----------------
Changed upstream version of shellcheck has different behavior for specific tests.

Reproducibility
---------------
100%

System Configuration
--------------------
gerrit review

Branch/Pull Time/Commit
-----------------------
NA

Last Pass
---------
Recent.

Timestamp/Logs
--------------
NA

Test Activity
-------------
Development

Workaround
----------
None.

Jim Gauld (jgauld)
Changed in starlingx:
assignee: nobody → Jim Gauld (jgauld)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.