Page MenuHomeFreeBSD

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

Authored by 0mp on Apr 23 2024, 11:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 1 2024, 4:57 AM
Unknown Object (File)
Oct 1 2024, 4:57 AM
Unknown Object (File)
Oct 1 2024, 2:23 AM
Unknown Object (File)
Sep 11 2024, 5:50 PM
Unknown Object (File)
Sep 11 2024, 1:10 AM
Unknown Object (File)
Sep 7 2024, 7:42 PM
Unknown Object (File)
Sep 7 2024, 7:41 PM
Unknown Object (File)
Sep 7 2024, 7:41 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.Apr 23 2024, 11:03 AM
des requested changes to this revision.Apr 23 2024, 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.Apr 23 2024, 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.Apr 23 2024, 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.Apr 23 2024, 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