discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clang formating


From: Ron Economos
Subject: Re: clang formating
Date: Wed, 11 Nov 2020 03:37:57 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

It's apparently not documented, but it works without --style-file as long as a .clang-format file exists in a directory at or above your current directory. You can test it with:

clang-format --dump-config

Ron

On 11/11/20 02:53, Johannes Demel wrote:
Hi,

unless the clang-format behavior changed, the function call should be:

clang-format --style=file -i path/to/file.cc

The `--style=file` option tells clang-format to search for a `.clang-format` file.

Cheers
Johannes

On 11.11.20 11:47, Ron Economos wrote:
I forgot to mention, you have to run clang-format-10 in tree. It gets the formatting rules from the file .clang-format in the top level directory.

Ron

On 11/11/20 02:41, Ron Economos wrote:
On Ubuntu 20.04:

sudo apt-get install clang-format-10

Then update your changed files.

clang-format-10 -i sourcefile.cc

The -i formats the file in place. Otherwise, output is to stdout.

Ron

On 11/11/20 02:20, Volker Schroer wrote:
Hi,

I just made a pr and got the message that the pr formatting check
failed. But looking at the output I don't understand, what's wrong.

Even more I'd like to know how I can do the formatting check locally.
The coding guide in the wiki is empty.

Thanks in advance

-- Volker











reply via email to

[Prev in Thread] Current Thread [Next in Thread]