13 Commits

Author SHA1 Message Date
anton
f41cf161cc update to knfmt-3.0.1 2022-08-14 12:06:00 +00:00
anton
ee058049b6 update to knfmt-3.0.0 2022-08-09 05:16:30 +00:00
anton
608c3d1752 update to knfmt-2.1.0
- introduce simple declarations, separate uninitialized stack local
  variable declarations are now merged into a single declaration
- align variable declarations spanning multiple lines
- fix struct fields alignment bug
- align enum just like struct
- do not confuse function call expression as a cpp declaration
- fix simple statement indentation bug
- fix break of long expressions
- fix label indentation bug
- fix function pointer call parenthesis alignment bug
- fix switch case statement indent bug
2022-06-01 05:18:41 +00:00
anton
5b37121df0 update to knfmt-2.0.0
- align cpp line continuations, i.e. backslashes
- trim empty lines before else statements
- add simple mode (`-s`) intended to simplify the source code:
  * removal of redundant parenthesis around return expressions
  * removal of redundant curly braces around oneline statements
  * do not mix presence and absence of curly braces around if/else
    statements if at least one statement cannot fit on a single line
- honor existing new lines among functions arguments
- honor space before goto labels
- remove extra space before attribute succeeding struct declarations
- do not confuse queue(3) macros as declarations
2022-04-13 05:09:51 +00:00
naddy
85229c97e7 drop RCS Ids 2022-03-11 18:49:30 +00:00
anton
674ab09684 update to knfmt-1.2.0
- discard excessive whitespace from comments and cpp macros
- do not confuse loop constructs hidden behind cpp macros
2022-01-12 07:01:36 +00:00
anton
b434935c69 update to knfmt-1.1.0
- handle windows line endings
- never break before the closing parens in a call expression
- trim empty lines after switch case statements
- trim trailing whitespace from comments
- optionally skip new line after function implementation
- multiple fixes related to handling of cpp branches
- fix indent of statements after switch case statement
- multiple fixes related to brace initializers
- correct handling of do/while statements in diff mode
2021-11-22 15:30:32 +00:00
anton
c6ced73632 update to knfmt-1.0.0
- handle and align x macros in brace initializers
- handle and align cpp macros in brace initializers
- allow enum declarations on a single line
- preserve new lines before comments and cpp declarations at end of a
  statement block
- only grow the buffer if more than half of the space is utilized
- do not let a cpp branch inside a struct declaration end the current
  scope of alignment
- long expressions in combination with optional new lines would not
  break under certain circumstances
2021-08-28 06:34:03 +00:00
anton
ba3ebb6995 update to knfmt-0.5.4
- fix several diff mode crashes
- handle mixed designated and positional initializers
- fix function pointer type detection regression
- fix alignment of nested brace initializers on the same line
2021-08-18 06:11:49 +00:00
anton
dc7b29f732 update to knfmt-0.5.3
- fix function pointer type detection regression
- improve detection of unknown types
- preserve spaces around misplaced binary operators
- preserve new lines before comments placed at the end of a statement block
- do not emit a new line before a field expression
2021-08-08 10:44:19 +00:00
anton
d106af4983 update to knfmt-0.5.2
- recognize unknown types as part of a cast expression
- do not confuse certain function calls and function pointers
2021-07-31 11:43:00 +00:00
anton
bb0a99893e update to knfmt-0.5.1
- fix diff mode bug caused by a diff chunk only adding cpp directives
- fix incorrect indentation for block comments followed by goto labels
- recognize function pointer types without arguments
2021-07-30 12:11:53 +00:00
anton
2ea4a40ad7 Import devel/knfmt, a utility used to format source code files to
conform to the Kernel Normal Form (KNF) in a best effort fashion.

ok jca@
2021-07-26 18:16:00 +00:00