Shellcheck will not let you check your script for POSIX compliance directly, as far as I know at least. However, shellcheck does let you explicitly check for compliance with the 'dash' shell, which aims to be POSIX compliant, which may be 'good enough' for your purpose.
shellcheck --shell=dash ./myscript.sh
However, this may not get what you are looking for: 'realpath' is a GNU (coreutils) external command, and not any shell built-in, so it will work with any shell (as long as the external command is available).
paste is also an external command. Shellcheck doesn't check for the presence/absence of _any_ external commands or flags. This will pass just fine:
aaaaaa foo bar | paste --nonexistant-flag
However, Shellcheck will warn you on _builtins_ which exist in other shells (e.g.: typeset) with SC2039.
Most helpful comment
pasteis also an external command. Shellcheck doesn't check for the presence/absence of _any_ external commands or flags. This will pass just fine:However, Shellcheck will warn you on _builtins_ which exist in other shells (e.g.:
typeset) with SC2039.