Commit Graph

24 Commits

Author SHA1 Message Date
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 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 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
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 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 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
Matt Caswell 33388b44b6 Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11616)
2020-04-23 13:55:52 +01: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 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