A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cnescatlab/i-CodeCNES/issues/121 below:

SH.FLOW.CheckCodeReturn · Issue #121 · cnescatlab/i-CodeCNES · GitHub

Implementation of the rule SH.FLOW.CheckCodeReturn.

Description

It's mandatory to verify error's code returned by any command or execution called by a shell script.

Known problems Commands execution handling

Description : Parseur behaviour becomes inaccurate when reading a command execution.

Pipe handling

Description : On a pipiline, where the first function hsouldn't be verified and that there is only one function to verify in the pipe line, the violation message is the one intended to simples functions. Also, raising false positive on || use.
Code example :

Test handling

Description : The checker raise a violation when the test returned isn't like if [ $? -eq 0].

Last file's violation is on a wrong line

Description : The last violation detected by the checker on a file is set on the previous line of the violation.
Code example :

cd testdir
date +%d_%m_%y > newfile
retour=$?
ls
Function declaration

Description : The checker is not handling some types of functions declaration. The problem is the same one as defined for several rules in #49 . This might also be the reason a false positive violation raise when a function name isn't clearly defined.

Exports handling

Description : The checker raises false positive on export use.
Code example : export –f funcName

State of the implementation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4