In Clayton, Policies are sets of rules and criteria designed to enforce coding standards, security measures, and best practices within your projects. They help maintain code quality and ensure compliance with industry standards.
By implementing and customizing these policies, teams can proactively manage code quality, adhere to best practices, and reduce technical debt across their projects.
Admin users can enable and disable policies to make them available to every project to achieve specific security and development goals.
Set up and edit your Policies
From the Clayton homepage, select the Admin Tool located at the bottom left of the page, then choose Policies from the dropdown menu.
From this screen, you can select which individual rules are included by default in each policy and set the policy behavior, allowing rules to be configured as opt-in, opt-out, mandatory, or disabled. Each rule also has an assigned severity level, indicating the risk and potential impact on technical debt for issues within an application.
Managing Individual Policies
You can enable or disable policies to suit your needs by selecting the pencil icon under the Actions column. You’ll then see a list of all enabled rules, which you can disable by toggling the switch. Note that some rules are disabled by default. You can view and enable these by clicking on Show Disabled Rules.
Policy Behavior
You can configure the behavior of your policy to make certain presets mandatory for all projects or optional, allowing Project Leads to decide which rules to enable. Policies can also be set to Disabled, OPT-OUT, OPT-IN , or Mandatory.
Disabled: the policy cannot be used in any project
OPT-OUT (default for new projects is ON): the policy is enabled by default when creating a new project, the Project Leads can decide to switch it off
OPT-IN (default for new projects is OFF): the policy is disabled by default when creating a new project, the Project Leads can decide to switch it on
Mandatory for all projects: the policy is enabled, and the Project Leads cannot switch it off
Create your custom policy
From the Clayton home page navigate to the admin tool on the bottom left of the screen and select Policies and then add New policy. You can now search for through the premade templates to define the rules you want to include and configure them as needed.
Next you will have the option to configure the behavior of your policy. After this will have the option give your new Policy a name and description.