[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: astyle configuration
Re: astyle configuration
Mon, 13 Jan 2020 07:44:30 -0800
On 01/13/2020 01:48 AM, Kai Torben Ohlhus wrote:
> On 1/13/20 3:38 AM, Rik wrote:
>> I recently style-checked the Octave code base using a combination of astyle
>> set for GNU coding standards and some Perl post-processing. It still
>> requires too much human inspection to review what the scripts find.
> Rik, thanks for doing all this work. I think ideally, there should be
> no/not much human interaction at all.
> Was it possible to document your exact Astyle command in the wiki 
> and maybe upload your Perl scripts to "build-aux"? Even better a short
> script like "build-aux/enforce_Octave_cpp_style.sh" calling astyle and
> your perl scripts correctly?
> This might save many whitespace change "ping-pongs" before releases, if
> all maintainers can enforce the same style guide "mechanically" and not
> by interpreting  subjectively. Especially, some patches became
> inapplicable after some time this way.
>> I don't think it particularly matters, and would prefer to let astyle
>> correct this and then stop harassing me. Are there any useful arguments
>> agains this change?
> I think astyle is a solid tool for this work and I have no objections to
> make maintenance easier.
> Just tried to let astyle help me using the `--style=gnu
> --indent=spaces=2` options :
> cp -R default default2 && cd default2 && rm -Rf .hg gnulib libgnu
> find . -name "*.h" -or -name "*.c" -or -name "*.cc" | xargs astyle
> --style=gnu --indent=spaces=2 > astyle.txt
> cat astyle.txt | wc -l #1253
> cat astyle.txt | grep "Formatted" | wc -l #881
> In 881 from 1253 files there was formatting necessary. Thus I cannot
> reproduce your style automatically.
>  https://wiki.octave.org/C%2B%2B_style_guide
>  http://astyle.sourceforge.net/astyle.html#_style=gnu
I will work a bit more on this. I use a separate file called astylerc
which throws many more configuration switches
- Octave coding style questions, Rik, 2020/01/12
- Re: Octave coding style questions, Mike Miller, 2020/01/12
- Re: Octave coding style questions, Kai Torben Ohlhus, 2020/01/13
- Re: astyle configuration,
- Re: astyle configuration, Gene Harvey, 2020/01/13
- Re: astyle configuration, Rik, 2020/01/13
- Re: astyle configuration, Kai Torben Ohlhus, 2020/01/14
- Re: astyle configuration, John W. Eaton, 2020/01/14
- Re: astyle configuration, Gene Harvey, 2020/01/14