{"id":702,"date":"2020-01-08T13:35:39","date_gmt":"2020-01-08T13:35:39","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/returned-variables-should-be-used\/"},"modified":"2020-04-08T09:42:27","modified_gmt":"2020-04-08T09:42:27","slug":"unusedreturnvalue","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/unusedreturnvalue","title":{"rendered":"Returned variables should be used"},"content":{"rendered":"\n<p style=\"text-align:center\">Introduced in version: 1.3 (29 Jan 2020)<\/p>\n\n\n\n<p>Variables returned from micro\/nanoflow calls and java(script) action calls should be used. If a variable is not used it should be marked as not used or given a name that starts with a given prefix e.g. <em>notused<\/em> (configurable)<\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-12.png\" alt=\"\" class=\"wp-image-715\" width=\"229\" height=\"145\"\/><\/figure>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"204\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-53.png\" alt=\"\" class=\"wp-image-984\"\/><\/figure>\n\n\n\n<p>or<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-13.png\" alt=\"\" class=\"wp-image-716\" width=\"261\" height=\"137\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-13.png 352w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-13-300x158.png 300w\" sizes=\"(max-width: 261px) 100vw, 261px\" \/><\/figure>\n\n\n\n<p>or<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"92\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-14.png\" alt=\"\" class=\"wp-image-717\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-14.png 769w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-14-480x57.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 769px, 100vw\" \/><\/figure>\n\n\n\n<p><em>Disclaimer<\/em>: We expect that this rule will trigger violations which are &#8220;false positives&#8221; i.e. violations that are not really something that needs your attention. In our view, the cost of a false positive is not as high as the cost of missing a bug. A false positive is easy to whitelist. On the other hand, a bug that ACR fails to detect can have large repercussions and costs in terms of development time and customer satisfaction. Therefore we will keep this rule as is in the hopes of catching bugs and accepting the occasional false positive.<\/p>\n","protected":false},"featured_media":0,"parent":97,"menu_order":38,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-702","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/702"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=702"}],"version-history":[{"count":5,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/702\/revisions"}],"predecessor-version":[{"id":1457,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/702\/revisions\/1457"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/97"}],"next":[{"title":"AM\/PM indicator should only be used in combination with lowercase \"h\"","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/ampmindicator","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1208"}],"prev":[{"title":"Module roles should be assigned to a project\/user role","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/unassignedmodulerole","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/572"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=702"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}