Page MenuHomeFreeBSD

checkstyle9: Allow a space between "*" and __restrict
ClosedPublic

Authored by 0mp on Tue, Apr 23, 11:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 11:42 AM
Unknown Object (File)
Fri, Apr 26, 10:33 AM
Unknown Object (File)
Fri, Apr 26, 6:12 AM
Unknown Object (File)
Fri, Apr 26, 4:09 AM
Unknown Object (File)
Fri, Apr 26, 3:24 AM
Unknown Object (File)
Fri, Apr 26, 3:24 AM
Unknown Object (File)
Fri, Apr 26, 3:17 AM
Unknown Object (File)
Thu, Apr 25, 9:22 PM
Subscribers

Details

Summary

Before the change, we would get errors like this:

ERROR: "foo * bar" should be "foo *bar"
#369: FILE: foobar.c:369:
+barbaz(char * __restrict s,

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp requested review of this revision.Tue, Apr 23, 11:03 AM
des requested changes to this revision.Tue, Apr 23, 11:27 AM
des added a subscriber: des.
des added inline comments.
tools/build/checkstyle9.pl
212

a) that's not going to work, the | is in the wrong place
b) you want to match restrict (without underscores) as well

This revision now requires changes to proceed.Tue, Apr 23, 11:27 AM
tools/build/checkstyle9.pl
212

Eh, that was a last minute edit to try and sort it. Thank you for catching that.

  • Fix "|"
  • Add "restrict"
  • Fix indentation
0mp marked an inline comment as done.Tue, Apr 23, 11:40 AM
tools/build/checkstyle9.pl
206

You could simply use _*restrict| to match both...

This revision is now accepted and ready to land.Tue, Apr 23, 12:56 PM
In D44911#1023975, @0mp wrote:

Use a glob

Kleene star, not glob, these are regular expressions.

In D44911#1023994, @des wrote:
In D44911#1023975, @0mp wrote:

Use a glob

Kleene star, not glob, these are regular expressions.

Okey-dokey :D