Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "coding standard structures" to standards page #2330

Merged
merged 8 commits into from
Feb 4, 2025
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion docs/organizations/using-coding-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,30 @@ Tools and patterns enabled by a coding standard are enforced and cannot be disab

## Using multiple coding standards {: id="using-multiple"}

When Codacy analyzes your code using multiple coding standards, it merges the tools and patterns from each standard. Enabled tools and patterns in any applied standard will be enforced.
When Codacy analyzes your code using multiple coding standards, it merges the tools and patterns from each standard.

A common strategy is to start with a baseline standard containing fundamental rules that apply across all repositories, then layer additional standards based on specific needs. You can organize these additional standards by:

- **Topics:** for example, security, performance, or maintainability
- **Architecture:** for example, backend or frontend
- **Languages or frameworks:** for example, React, Java or Python
- **Teams or tribes:** Allow different teams or tribes to maintain their own standards while inheriting organization-wide rules

![Coding standards strategies](images/coding-standard-strategy.png)

!!! note
You can apply up to 10 coding standards to your organization. Standards can overlap, meaning a single repository can follow multiple standards simultaneously.

!!! important
If the same pattern appears in multiple standards, the version from the most recently created and applied standard (with its parameters) takes precedence.

### Implementation guidelines {: id="standards-implementation"}
Consider these points when implementing coding standards:

- **Keep maintenance simple:** Minimize overlap between standards and establish clear ownership to reduce maintenance complexity
- **Manage access:** Assign organization managers or Git provider admin roles to users who should manage (create, edit and delete) organization-level standards (learn more in [Roles and Permissions](./roles-and-permissions-for-organizations.md/#managing-the-organization-manager-role))
- **Be mindful of repository customization:** Individual repositories can have their own specific overrides through additional code patterns, custom tool configurations, or local configuration files

## See also

- [Configuring code patterns on each repository](../repositories-configure/configuring-code-patterns.md)
Expand Down
Loading