ament / ament/ament_lint

`InsertNewlineAtEOF` entry seen as invalid argument

Open
#498 1 comment 0 reactions 1 assignee Claimed by @wjwwood View on GitHub
Dominant language
Python
Stars
50
Forks
129
Avg merge
3d 10h
Merged PRs (30d)
3

Description

I added one entry to my `.clang-format` file, namely the `InsertNewlineAtEOF: true` line. Now the `.clang-format` looks like:

---
Language: Cpp
BasedOnStyle: Google

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
BreakBeforeBraces: Custom
ColumnLimit: 100
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
InsertNewlineAtEOF: true
PointerAlignment: Middle
ReflowComments: false
...

However, when running `ament_clang_format --config ./clang-format` I got:
```
{AccessModifierOffset: -2, AlignAfterOpenBracket: AlwaysBreak, BasedOnStyle: Google, BraceWrapping: {AfterClass: true, AfterFunction: true, AfterNamespace: true, AfterStruct: true}, BreakBeforeBraces: Custom, ColumnLimit: 100, ConstructorInitializerIndentWidth: 0, ContinuationIndentWidth: 2, DerivePointerAlignment: false, InsertNewlineAtEOF: true, Language: Cpp, PointerAlignment: Middle, ReflowComments: false}
^~~~~~~~~~~~~~~~~~
Error parsing -style: Invalid argument
:1:325: error: unknown key 'InsertNewlineAtEOF'
```
several times. Removing this line fixes the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.