HomeDevCentral

Address SC3028 at instruction level

Description

Address SC3028 at instruction level

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

Reviewers: DorianWinty

Reviewed By: DorianWinty

Differential Revision: https://devcentral.nasqueron.org/D3680

Details

Provenance
derecksonAuthored on Mon, Sep 15, 21:21
derecksonPushed on Tue, Oct 14, 17:09
Reviewer
DorianWinty
Differential Revision
D3680: Address SC3028 at instruction level
Parents
rOPS7c71a4fc9938: Update Certbot helper file path in tests
Branches
Unknown
Tags
Unknown