{"id":772,"date":"2020-11-06T19:35:28","date_gmt":"2020-11-06T19:35:28","guid":{"rendered":"https:\/\/wearesmile.com\/help\/?post_type=ht_kb&#038;p=772"},"modified":"2022-08-03T10:55:47","modified_gmt":"2022-08-03T09:55:47","slug":"code-quality-standards","status":"publish","type":"ht_kb","link":"https:\/\/wearesmile.com\/help\/documentation\/code-quality-standards\/","title":{"rendered":"Code Quality Standards"},"content":{"rendered":"\n<p>If you have Git Mirroring enabled on your HappyPress subscription, then you&#8217;ll be able to submit your own code for review and, ultimately, deployment. <\/p>\n\n\n\n<p>For Gitlab users: You should ensure that your Gitlab repository is configured to automatically run our tests when you commit to a merge request. To do this, you can add our public test Gitlab CI file to your repo. You do this by going to the repo&#8217;s Settings > CI\/CD, and under &#8220;CI\/CD configuration file&#8221; add <code>theme-test.yml@wearesmile\/operations\/infrastructure\/git-mirroring-ci<\/code><\/p>\n\n\n\n<p>We run automated testing to check your code quality upon a Merge Request (MR). If your MR fails these tests, it will be rejected.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Test<\/th><th>What is it tested with?<\/th><th>Config file<\/th><\/tr><\/thead><tbody><tr><td>Code Quality<\/td><td><a href=\"https:\/\/github.com\/squizlabs\/PHP_CodeSniffer\">php_codesniffer<\/a> (including <a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/coding-standards\/\">WordPress Coding Standards<\/a>)<\/td><td>codesniffer.ruleset.xml<\/td><\/tr><tr><td>SCSS<\/td><td><a href=\"https:\/\/stylelint.io\/\">Style Lint<\/a><\/td><td>.stylelintrc<\/td><\/tr><tr><td>PHP Syntax<\/td><td>PHP<\/td><td>N\/A<\/td><\/tr><tr><td>Javascript<\/td><td><a href=\"https:\/\/eslint.org\/\">ESlint<\/a><\/td><td>.jshintrc<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>For further information, you should always check your theme&#8217;s readme file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have Git Mirroring enabled on your HappyPress subscription, then you&#8217;ll be able to submit your own code for review and, ultimately, deployment. For Gitlab users: You should ensure that your Gitlab repository is configured to automatically run our tests when you commit to a merge request. To do&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_searchwp_excluded":"","footnotes":""},"ht-kb-category":[111,88],"ht-kb-tag":[],"class_list":["post-772","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-git-mirroring","ht_kb_category-happypress"],"_links":{"self":[{"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/comments?post=772"}],"version-history":[{"count":3,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb\/772\/revisions"}],"predecessor-version":[{"id":1404,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb\/772\/revisions\/1404"}],"wp:attachment":[{"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/media?parent=772"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb-category?post=772"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/wearesmile.com\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}