# Ignore Directive

Arnica provides the ability to exclude specific files from secret scanning using the **Ignore Directive** function. This functionality is particularly useful in staging or testing environments, as it allows you to completely skip entire files during the scanning process.

To configure it for a specific file, simply add the `@arnica-ignore` string anywhere in the file. Once added, the entire file will be excluded from secret scanning.

Please keep the following in mind:

* Although the default string is `@arnica-ignore`, it is fully customizable upon request.
* The string can be placed anywhere within the file and will be treated equally regardless of its location.
* While it is recommended to follow best practices by placing the **Ignore Directive** string next to a secret within the file, it will function correctly no matter where it is located.

-Example of a JWT with **Ignore Directive** configured:

```java
 describe("LastLoginIpComponent", () => {
  it("should set Last-Login IP from JWT as trusted HTML", () => {
    // @arnica-ignore
    localStorage.setItem("token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Imxhc3RMb2dpbklwIjoiMS4yLjMuNCJ9fQ.RAkmdqwNypuOxv3SDjPO4xMKvd1CddKvDFYDBfUt3bg");
    component.ngOnInit();
    expect(sanitizer.bypassSecurityTrustHtml).toHaveBeenCalledWith("<small>1.2.3.4</small>");
  });
  it("should not set Last-Login IP if none is present in JWT", () => {
    // @arnica-ignore
    localStorage.setItem("token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fX0.bVBhvll6IaeR3aUdoOeyR8YZe2S2DfhGAxTGfd9enLw");
    component.ngOnInit();
    expect(component.lastLoginIp).toBe("?");
  });
});
```


---

# 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://docs.arnica.io/arnica-documentation/hardcoded-secrets/ignore-directive.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.
