diff --git a/SC2269.md b/SC2269.md new file mode 100644 index 0000000..b7fcb1b --- /dev/null +++ b/SC2269.md @@ -0,0 +1,28 @@ +## This variable is assigned to itself, so the assignment does nothing. + +### Problematic code: + +```sh +var="$var" +``` + +### Correct code: + +```sh +# If the goal is to do nothing +true +``` + +### Rationale: + +ShellCheck found a variable that is assigned to itself, e.g. `x=$x`. This obviously has no effect. + +Double check what the assignment was supposed to do. + +### Exceptions: + +None. + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file