Skip to content

[New Check]: Check for self-assignment leading to blank value #626

@thesamesam

Description

@thesamesam

Is there an existing such new check request for this?

  • I have searched the existing issues

Explain

We want to catch trivial typos like RDEPEND="${RDEPEND}".

Examples

https://github.com/gentoo/gentoo/blob/4a9057157eb7b863d788cd488714a9fa1033d604/games-util/basis_universal/basis_universal-1.16.3.ebuild#L22

# zstd is bundled, see https://github.com/BinomialLLC/basis_universal/pull/228
DEPEND="
	opencl? ( virtual/opencl )
"
RDEPEND="${RDEPEND}" # <--- RDEPEND is now blank, should be RDEPEND="${DEPEND}"

Output message

SuspisciousSelfAssignment

Documentation

Variable is being assigned to itself, blanking the value.

Result level

warning

Metadata

Metadata

Assignees

Labels

bashrequires bash-parsing supportcheck

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions