﻿---
title: insert_final_newline
description: Ensure the file ends with a newline. Defaults to `true`
url: https://docs-v3-preview.elastic.dev/reference/core/insert_final_newline
---

# insert_final_newline
Ensure the file ends with a newline.

## Values


| Value   | Notes |
|---------|-------|
| `true`  |       |
| `false` |       |

**Default:** `true`

### `insert_final_newline = true`

```ini
insert_final_newline = true
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    namespace N;

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    namespace N;

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>
</tab-set>


### `insert_final_newline = false`

```ini
insert_final_newline = false
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    namespace N;

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    namespace N;

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>
</tab-set>