{"id":91,"date":"2019-11-01T11:49:17","date_gmt":"2019-11-01T11:49:17","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr\/whitelist\/"},"modified":"2023-03-09T09:16:52","modified_gmt":"2023-03-09T09:16:52","slug":"whitelist","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr\/whitelist","title":{"rendered":"Allowlist and annotations"},"content":{"rendered":"\n<p>If ACR generates a violation and you decide in this case the violation is allowed, as designed, a needed exception or any other good reason to allow this, you have 2 options:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Add the violation to the allow list<\/li><li>Annotate the violation in the model<\/li><\/ul>\n\n\n\n<p>Both options remove the violation by default out of the list of violations. Both options can show the allowed violations by filtering them:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"137\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-98-1024x137.png\" alt=\"\" class=\"wp-image-2710\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-98-1024x137.png 1024w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-98-980x131.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-98-480x64.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>The advantage of annotations is that the annotation is in the model and visible for the developer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Allowlist<\/h2>\n\n\n\n<p>A violation can be added to the allowlist from the violations overview.<\/p>\n\n\n\n<p>In the allowlist tab, you can see 4 different ways in which violations can be allowed:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Modules from the Appstore can be automatically be put on the allowlist<\/li><li>Individual modules can be placed on the allowlist via the modules menu<\/li><li>Violations can be annotated in the model. Here the number of violations annotated in the model is shown. The violations themselves can be found under the violations menu when searching for allowlisted violations. This is because these violations are per revision and the allowlist is independent of revisions.<\/li><li>Allowlisted violations in this project.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"673\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-99-1024x673.png\" alt=\"\" class=\"wp-image-2711\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-99-980x644.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-99-480x316.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>To filter violations in the allowlist:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"202\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-100-1024x202.png\" alt=\"\" class=\"wp-image-2713\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-100-1024x202.png 1024w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-100-980x193.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-100-480x94.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>To remove one or more violations from the allowlist, select the specific violations or rule(s) and click on <em>Unlist selected<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"282\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-101-1024x282.png\" alt=\"\" class=\"wp-image-2714\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-101-1024x282.png 1024w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-101-980x270.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-101-480x132.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Annotations<\/h2>\n\n\n\n<p>Violations can be annotated in the model. For this you need a code.  The annotation is prefixed with \u2018\/*ACR-Allow:\u2019. Next, the short rule code is added. The code annotation can contain multiple rules, separated by a comma, semi-colon, dot or space. The code annotation ends with a &#8216;*\/&#8217;, so you can still add other text to the documentation.<\/p>\n\n\n\n<p><em>The code comment syntax \/* \u2026 *\/ has been chosen because widgets do not have a documentation property and we want to annotated them via the style property. The comment syntax makes sure our annotation does not interfere with styling.<\/em><\/p>\n\n\n\n<p><em>You can add other text to the documentation before or after the annotation. You can add multiple annotations.<\/em><\/p>\n\n\n\n<p>This short rule code can be found via the violation in the violations overview:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"315\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-102.png\" alt=\"\" class=\"wp-image-2715\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-102.png 578w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-102-480x262.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 578px, 100vw\" \/><\/figure>\n\n\n\n<p>And via the rule settings details dialog:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"478\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-103.png\" alt=\"\" class=\"wp-image-2716\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-103.png 666w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2022\/05\/image-103-480x345.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 666px, 100vw\" \/><\/figure>\n\n\n\n<p>Both copy the code for the annotation in the copy-paste buffer. So in the modeler in the right place you can paste this code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-annotate-in-code\">Annotations in the model<\/h2>\n\n\n\n<p>Annotations in the model are placed in the following properties of the Mendix model:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Documentation<\/li><li>Microflow annotation for microflow actions<\/li><li>Widget style for widgets<\/li><li>As a simple document (a regex is chosen) in a folder for folder rules<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Documentation-property\">Documentation property<\/h3>\n\n\n\n<p>All documents and also entities, associations, attributes, module roles, project roles have a documentation property. Hence the documentation property is the default place to add code annotations.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"116\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/1.png\" alt=\"\" class=\"wp-image-2226\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/1.png 572w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/1-480x97.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 572px, 100vw\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Microflows\">Microflows<\/h3>\n\n\n\n<p>In microflows, you can add visual text annotations. In this text we can add a code annotation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"450\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/2.png\" alt=\"\" class=\"wp-image-2227\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/2.png 902w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/2-480x239.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 902px, 100vw\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Widgets\">Widgets<\/h3>\n\n\n\n<p>In widgets adding annotations is harder, but we can choose the style property to add a code annotation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"494\" height=\"136\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/3.png\" alt=\"\" class=\"wp-image-2228\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/3.png 494w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/3-480x132.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 494px, 100vw\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Folders\">Folders<\/h3>\n\n\n\n<p>For folders we can add a regular expression:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"227\" height=\"74\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2021\/08\/4.png\" alt=\"\" class=\"wp-image-2229\"\/><\/figure>\n\n\n\n<p>This also works for modules, when placed in the root of the module. The name of the regular expression does not matter. We scan all regular expressions for annotations.<\/p>\n\n\n\n<p><em>We chose not the use a disabled regular expression because you want to be able to search for \u2018\/*ACR\u2019 in the model and disabled documents are skipped in the search!!<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Documents-without-documentation-property\">Documents without documentation property<\/h3>\n\n\n\n<p>For documents without a documentation property (like an enum) you can use the allowlist.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Project\">Project<\/h3>\n\n\n\n<p>For the entire project, there is no good place to annotate. Use the allowlist.<\/p>\n","protected":false},"featured_media":0,"parent":43,"menu_order":12,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-91","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/91"}],"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=91"}],"version-history":[{"count":9,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/91\/revisions"}],"predecessor-version":[{"id":2717,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/91\/revisions\/2717"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/43"}],"next":[{"title":"Rules","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr\/rules","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1080"}],"prev":[{"title":"Revisions","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr\/revisions","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/86"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}