Page MenuHomeFreeBSD

sanitize.lua: A tool to extract interfaces from files
ClosedPublic

Authored by imp on Tue, Feb 3, 5:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 28, 11:50 PM
Unknown Object (File)
Thu, Feb 19, 1:23 PM
Unknown Object (File)
Thu, Feb 19, 9:34 AM
Unknown Object (File)
Tue, Feb 17, 10:10 AM
Unknown Object (File)
Tue, Feb 10, 9:52 PM
Unknown Object (File)
Sat, Feb 7, 5:03 PM
Unknown Object (File)
Fri, Feb 6, 8:03 PM
Unknown Object (File)
Thu, Feb 5, 1:34 AM
Subscribers
None

Details

Summary

This is a simple too to remove all comments, extra whitespace and other
unnecessary things that may have creative content. What remains can be
just the minimal interface described by the header file. When used with
care, this can mechanically sanitize files, like some device tree
bindings file, that are only #defines that are meant to be used in
multiple context (the dts files and in C code to interpret the resulting
dtb).

Diff Detail

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

Event Timeline

imp requested review of this revision.Tue, Feb 3, 5:51 PM
imp created this revision.

Seems reasonable

tools/tools/git/sanitize.lua
35

You can drop the error handling with an assert, difference shouldn't be too difficult to interpret on failure

This revision is now accepted and ready to land.Wed, Feb 4, 8:13 PM

address Kyle's suggestion

This revision now requires review to proceed.Thu, Feb 5, 7:14 PM
This revision was not accepted when it landed; it landed in state Needs Review.Fri, Feb 27, 12:40 AM
This revision was automatically updated to reflect the committed changes.