> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/10.8/core-concepts/clean-as-you-code/introduction.md).

# Introduction

An introduction to the approach to improving code quality in SonarQube Server 10.8.

{% hint style="info" %}
**For AI agents:** You're in the SonarQube Server 10.8 documentation. For a list of all 10.8 pages, see the [SonarQube Server 10.8 page index](https://312504542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJj3TXBdWssTGGg8qK5I%2Fuploads%2FmeJ1nVNGPezOurNrTy4A%2Fsonarqube-server-10.8-llms.txt?alt=media). For the whole site, see the [page index](https://docs.sonarsource.com/llms.txt) or the [full text](https://docs.sonarsource.com/llms-full.txt). For another version, replace 10.8 in the URL with that version. The [latest version](https://docs.sonarsource.com/sonarqube-server/) has no version number in its URL.
{% endhint %}

Improving code quality is a software development practice based on the principle that *new code* (code that you added or modified recently) needs to comply with quality standards. The Sonar solution supports improving code quality by warning you whenever issues are detected in your new code.

When you add new code to your projects, you usually touch a portion of the old code in the process. As a consequence, analyzing and cleaning new code allows you to fix issues in your old code and gradually improve the overall quality of your codebase.

![](https://312504542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJj3TXBdWssTGGg8qK5I%2Fuploads%2Fgit-blob-1c11bd79bfd7915cfe081d478c30ab477cdd82d8%2F3e15eaa38ec923b342261e5df52f42e20aa11678.png?alt=media)

The end goal is to achieve high code quality across your entire codebase. This approach is also suitable for legacy projects with a substantial amount of code, although in this case a full cleanup can hardly be achieved.

Sometimes, you may want to implement additional measures to ensure the quality of the overall code base, such as checking for vulnerabilities and performing refactoring. This approach does not prevent you from pursuing these additional use cases.

## Benefits of improving code quality <a href="#benefits-of-clean-as-you-code" id="benefits-of-clean-as-you-code"></a>

### For developers <a href="#for-developers" id="for-developers"></a>

* You ensure that all new code added to the project is always clean.
* You gain time by reducing and even eliminating debt-addressing sprints.
* You adopt a sustainable approach to software development, as cleaning code becomes part of the development routine.
* You fix issues in your own code, reducing the complexity that comes with fixing old code that is hard to understand.

### For organizations <a href="#for-organizations" id="for-organizations"></a>

* The overall quality of your code increases over time.
* You ensure your software meets high quality standards.
* You increase developer morale by reducing debt-addressing sprints.
* Engineering/Feature development velocity increases.

In SonarQube Server, you can get a visual representation of your code quality improvements based on the data in your projects by navigating to **More** > **Clean as You Code**.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Software qualities](/sonarqube-server/10.8/core-concepts/software-qualities.md)
* [Setting up new code](/sonarqube-server/10.8/project-administration/setting-up-clean-as-you-code.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/10.8/core-concepts/clean-as-you-code/introduction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
