Matt Caswell
da1c088f59
Copyright year updates
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes
2023-09-07 09:59:15 +01:00
Dr. David von Oheimb
ee17148792
check-format.pl: fix statistics on whitespace and nesting issues
...
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19796 )
2023-02-08 16:22:06 +01:00
Dr. David von Oheimb
4381c02e9b
check-format.pl: fix detection of '#ifdef __cplusplus'
...
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19796 )
2023-02-08 16:22:06 +01:00
Dr. David von Oheimb
33c7ad364f
check-format.pl: fix detection of function body start
...
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19796 )
2023-02-08 16:22:06 +01:00
Dr. David von Oheimb
3e139f3d85
check-format.pl: improve whitespace reporting on <op>=
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812 )
2022-09-02 21:32:46 +02:00
Dr. David von Oheimb
0a8a9f8f63
check-format.pl: further fixes for whitespace reporting within 'for (...)'
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812 )
2022-09-02 21:32:46 +02:00
Dr. David von Oheimb
521f07eb08
check-format.pl: report #if and #elif with constant condition; improve checks on '/*'
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812 )
2022-09-02 21:32:46 +02:00
Dr. David von Oheimb
6549041704
check-format.pl: extend checking into macro bodies; small further improvements
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812 )
2022-09-02 21:32:46 +02:00
Dr. David von Oheimb
ed9876cc39
check-format.pl: improve preprocessor directive handling; re-order state variables
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812 )
2022-09-02 21:32:37 +02:00
Dr. David von Oheimb
23757b61d4
check-format.pl: fix detection of missing/extra blank lines in local decls
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18789 )
2022-07-20 07:30:29 +01:00
Dr. David von Oheimb
4e9fa07121
check-format.pl: fix false positive on 'for(;; stmt)'
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18789 )
2022-07-20 07:30:28 +01:00
Dr. David von Oheimb
63263147a3
check-format.pl: improve wording: 'no' -> 'missing'; further minor improvements
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18789 )
2022-07-20 07:30:28 +01:00
Dr. David von Oheimb
c30bc4e209
check-format.pl: Fix report on space before ';' and allow it after ')'
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17434 )
2022-01-09 13:19:52 +11:00
Dr. David von Oheimb
d45c0e1a5e
check-format.pl: Fix report on missing space before +/-: allow, e.g., '1e-6'
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17434 )
2022-01-09 13:19:52 +11:00
Dr. David von Oheimb
15ae69fa7b
check-format.pl: Fix report on constant on LHS of comparison/assignment
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17434 )
2022-01-09 13:19:52 +11:00
Dr. David von Oheimb
d8662f2f87
check_format.pl: Add checks for blank lines within/after local decls
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17434 )
2022-01-09 13:19:52 +11:00
Dimitris Apostolou
e304aa87b3
Fix typos
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17392 )
2022-01-05 12:37:20 +01:00
Dr. David von Oheimb
2e6afe1079
check-format.pl: Fix report on constant on LHS of comparison or assignment
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17396 )
2022-01-04 15:25:54 +01:00
a1346054
473664aafd
always use the same perl in $PATH
...
Different tests may use unexpectedly different versions of perl,
depending on whether they hardcode the path to the perl executable or if
they resolve the path from the environment. This fixes it so that the
same perl is always used.
Fix some trailing whitespace and spelling mistakes as well.
CLA: trivial
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16362 )
2021-09-02 12:55:39 +10:00
Dr. David von Oheimb
41d331b6f0
check-format.pl: Rename '*-cmt' options '*-comment'
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
eb9b532089
check-format.pl: Allow extra space before end-of-line comments unless -e|--eol-cmt given
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
f35a9b6a2d
check-format.pl: Replace 'SPC' and 'spc' by 'space' in reports and option names
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
d3fc80abfc
check-format.pl: Fix false positive on struct/union/enum in func return type
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
9ad9002dd5
check-format.pl: Fix false positive "no SPC before binary '*'" for '!*'
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
435e659a03
check-format.pl: Report needless intermediate multiple SPC only on -e or --extra-spc
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Dr. David von Oheimb
ff38103324
check-format.pl: Add check for constant left of comparison operator
...
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15077 )
2021-05-20 16:29:13 +02:00
Richard Levitte
4333b89f50
Update copyright year
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13999 )
2021-01-28 13:54:57 +01:00
Dr. David von Oheimb
c972577684
util/check-format.pl: Minor improvements of whitespace checks
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13710 )
2021-01-19 17:23:39 +01:00
Dr. David von Oheimb
13a574d8bb
check-format.pl: Allow nested indentation of labels (not only at line pos 1)
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13019 )
2020-09-30 20:51:23 +02:00
Dr. David von Oheimb
8e655da022
check-format.pl: Extend exceptions for no SPC after trailing ';' in 'for (...;)'
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13019 )
2020-09-30 20:51:23 +02:00
Dr. David von Oheimb
df4ec39203
check-format.pl: Document how to run positive and negative self-tests
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13019 )
2020-09-30 20:51:23 +02:00
Dr. David von Oheimb
174f4a4d6a
check-format.pl: Report empty lines only if -s (--sloppy-spc) is not used
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12270 )
2020-07-20 11:17:34 +02:00
Dr. David von Oheimb
dc18781550
check-format.pl: Add check for essentially empty line at beginning of file
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12270 )
2020-07-20 11:17:34 +02:00
Dr. David von Oheimb
43b2e9e008
check-format.pl: Add check for multiples essentially empty lines in a row
...
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12270 )
2020-07-20 11:17:34 +02:00
Dr. David von Oheimb
a77571c34f
check-format.pl: Allow comment start '/*' after opening '(','[','{'
...
On this occasion fix uses of the word 'nor'.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12270 )
2020-07-20 11:17:34 +02:00
Dr. David von Oheimb
90a7c90500
fix false positive of check-format.pl regarding '#if' on preceding line; extend negative tests
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11285 )
2020-03-18 13:43:36 +01:00
Dr. David von Oheimb
aed723f1e4
make util/check-format.pl script executable
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11285 )
2020-03-18 13:43:36 +01:00
Dr. David von Oheimb
38e497818e
fix false positive of check-format.pl reporting '{1 stmt}' after multi-line 'if(expr)'
...
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11285 )
2020-03-18 13:43:36 +01:00
Dr. David von Oheimb
99a16e0459
Renew and extend the tool for checking adherence to C coding style rules
...
aims at checking most of https://www.openssl.org/policies/codingstyle.html
and various requirements not yet explicitly stated there - see also #10725
add util/check-format.pl and its self-tests in
util/check-format-test-{positives,negatives}.c
remove util/openssl-format-source
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/10363 )
2020-03-09 11:03:21 +01:00