ament / ament/ament_lint

`InsertNewlineAtEOF` entry seen as invalid argument

未關閉
#498 1 則留言 0 個 reaction 已指派 1 人 已被 @wjwwood 認領 在 GitHub 檢視
主要語言
Python
星號
50
分支
129
平均合併
3 天 10 小時
30 天內合併 PR
3

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。