# Code Smell

In code reviews, "code smell" refers to indicators or signs in the code that may indicate deeper problems or inefficiencies.

<div align="left"><figure><img src="/files/01EgLiVOArk2oIaFHI05" alt=""><figcaption></figcaption></figure></div>

These issues are not necessarily bugs but rather characteristics that suggest the code could be improved. Code smells can take various forms, such as overly complex or convoluted logic, long and monolithic functions, or inconsistent naming conventions. They may also include redundant or duplicate code, excessive comments, or excessive coupling between different components of the codebase. While individually these issues may not cause immediate problems, they can make the code harder to understand, maintain, and extend over time.

By identifying and addressing code smells during code review, developers can enhance code quality, readability, and maintainability, ultimately leading to more robust and scalable software applications. Strategies such as refactoring, simplifying complex logic, and adhering to best practices and design patterns can help mitigate code smells and improve overall code quality.

### **Managing rules for code smell-type issues**

You can manage these from the **Settings > Code health > Rules.**

<div align="left"><figure><img src="/files/tLhfozaKsrgDXEMgz7SE" alt="" width="563"><figcaption></figcaption></figure></div>

You can filter these pre-defined rules based on severity, language, and type.\
Additionally, you have the option to toggle individual rules on and off to mark them as active or inactive.\
Once deactivated, the respective issue will no longer be highlighted during subsequent reviews.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://typo.gitbook.io/typo-help-docs/engineering-metrics/code-quality-metrics/code-smell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
