On Wed, Oct 23, 2024 at 2:14 AM Paul Moore <paul@xxxxxxxxxxxxxx> wrote: > > On Tue, Oct 22, 2024 at 3:14 PM Stephen Smalley > <stephen.smalley.work@xxxxxxxxx> wrote: > > > > tools/check-syntax in the testsuite is calling astyle with options > > that seemingly don't exist anymore on my shiny new F41. The end result > > is that it will generate a diff deleting any C file from the > > testsuite. > > I ran into something similar last year with the audit-testsuite and > astyle v3.2.x (may have been an issue with earlier versions, not > sure). I should have sent a heads-up to Ondrej and the list, but it > looks like I forgot or was distracted. > > > Invalid Artistic Style options: > > indent-preprocessor > > I dropped this in the audit-testsuite and it didn't seem to have a > significant impact. > > > max-instatement-indent=80 > > I replaced this with '--max-continuation-indent=80' to get a reasonable result. > > The current astyle (v3.6.2) call in the audit-testsuite looks like this: > > astyle --options=none --lineend=linux --mode=c \ > --style=linux \ > --indent=force-tab=8 \ > --indent-col1-comments \ > --min-conditional-indent=0 \ > --max-continuation-indent=80 \ > --pad-oper \ > --align-pointer=name \ > --align-reference=name \ > --max-code-length=80 \ > --break-after-logical Thanks, that works, but the 3.5.2 version currently in F41 has a bug [1], which produces an ugly diff [2]. And when I try Rawhide with the latest 3.6.3 version that is supposed to have it fixed, the formatting of some continuation lines breaks terribly... I'm giving up for now. If someone wants to chase it down with upstream, feel free to. [1] https://gitlab.com/saalen/astyle/-/issues/57 [2] https://gist.github.com/WOnder93/6fc510582f3632014cadf8036a3dc36e -- Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.