prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.06k stars 5.38k forks source link

[Native] Clang format InsertNewlineAtEOF invalid argument error in CI job #23221

Closed karteekmurthys closed 4 months ago

karteekmurthys commented 4 months ago

CI job: https://app.circleci.com/pipelines/github/prestodb/presto/17874/workflows/49428eae-88f6-4ffd-b4c1-a9e0a1b9d523/jobs/70682

Error:

Ok   : CMakeLists.txt
Skip : Makefile
Ok   : presto_cpp/main/CMakeLists.txt
/root/project/presto-native-execution/.clang-format:75:1: error: unknown key 'InsertNewlineAtEOF'
InsertNewlineAtEOF: true
^~~~~~~~~~~~~~~~~~
Error reading /root/project/presto-native-execution/.clang-format: Invalid argument
error: `clang-format -style=file -lines=20:20 -lines=33:39 presto-native-execution/presto_cpp/main/PrestoMain.cpp` failed
Error: presto_cpp/main/PrestoMain.cpp
make: *** [Makefile:109: format-check] Error 1

If we add a new line in the PrestoMain.cpp file, on make format-fix, the new line is erased.

Your Environment

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

1. 2. 3. 4.

Screenshots (if appropriate)

Context

majetideepak commented 4 months ago

Likely due to an older version of clang-format. I will fix the CI image.

clang-format --version
Ubuntu clang-format version 12.0.0-1ubuntu1