Page MenuHomeDevCentral

Address SC3028 at instruction level
Needs ReviewPublic

Authored by dereckson on Mon, Sep 15, 21:23.
Tags
None
Referenced Files
F11722932: D3680.id9525.diff
Tue, Sep 16, 06:42
F11722829: D3680.diff
Tue, Sep 16, 05:52
F11722497: D3680.id9528.diff
Tue, Sep 16, 02:51
F11722293: D3680.id.diff
Tue, Sep 16, 02:07
F11722221: D3680.id.diff
Tue, Sep 16, 01:50
F11722212: D3680.id9525.diff
Tue, Sep 16, 01:49
F11722210: D3680.id9528.diff
Tue, Sep 16, 01:48
F11722183: D3680.diff
Tue, Sep 16, 01:43
Subscribers
None

Details

Reviewers
DorianWinty
Summary

The shellcheck SC3028 check warns when variables common in sh/bash
are not defined in POSIX sh. This is generally $UID and $EUID.

This check is currently suppressed at repository level, but that prevents
to check other variables like $HOSTNAME, $MACHTYPE or $SHELLOPTS.

Align code of operations repository with recommended D3679 snippet:

  • SC3028 is defined at instruction level, not arc configuration
  • all scripts use the snippet testing for EUID, with id as fallback

For reference, csh and tcsh are the two shells not implementing UID and EUID.

Test Plan

arc lint

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
EUID-SC3028
Build Status
Buildable 5897
Build 6179: arc lint + arc unit

Event Timeline

dereckson created this revision.
dereckson retitled this revision from Address SC3028 at script level to Address SC3028 at instruction level.Mon, Sep 15, 22:53
dereckson edited the summary of this revision. (Show Details)