summaryrefslogtreecommitdiffstats
path: root/util/check-format.pl
AgeCommit message (Collapse)Author
2023-02-08check-format.pl: fix statistics on whitespace and nesting issuesDr. David von Oheimb
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-08check-format.pl: fix detection of '#ifdef __cplusplus'Dr. David von Oheimb
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-08check-format.pl: fix detection of function body startDr. David von Oheimb
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19796)
2022-09-02check-format.pl: improve whitespace reporting on <op>=Dr. David von Oheimb
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-02check-format.pl: further fixes for whitespace reporting within 'for (...)'Dr. David von Oheimb
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-02check-format.pl: report #if and #elif with constant condition; improve ↵Dr. David von Oheimb
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-02check-format.pl: extend checking into macro bodies; small further improvementsDr. David von Oheimb
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-02check-format.pl: improve preprocessor directive handling; re-order state ↵Dr. David von Oheimb
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-07-20check-format.pl: fix detection of missing/extra blank lines in local declsDr. David von Oheimb
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-20check-format.pl: fix false positive on 'for(;; stmt)'Dr. David von Oheimb
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-20check-format.pl: improve wording: 'no' -> 'missing'; further minor improvementsDr. David von Oheimb
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-01-09check-format.pl: Fix report on space before ';' and allow it after ')'Dr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17434)
2022-01-09check-format.pl: Fix report on missing space before +/-: allow, e.g., '1e-6'Dr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17434)
2022-01-09check-format.pl: Fix report on constant on LHS of comparison/assignmentDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17434)
2022-01-09check_format.pl: Add checks for blank lines within/after local declsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17434)
2022-01-05Fix typosDimitris Apostolou
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-04check-format.pl: Fix report on constant on LHS of comparison or assignmentDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17396)
2021-09-02always use the same perl in $PATHa1346054
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-05-20check-format.pl: Rename '*-cmt' options '*-comment'Dr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Allow extra space before end-of-line comments unless ↵Dr. David von Oheimb
-e|--eol-cmt given Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Replace 'SPC' and 'spc' by 'space' in reports and option namesDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Fix false positive on struct/union/enum in func return typeDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Fix false positive "no SPC before binary '*'" for '!*'Dr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Report needless intermediate multiple SPC only on -e or ↵Dr. David von Oheimb
--extra-spc Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-05-20check-format.pl: Add check for constant left of comparison operatorDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15077)
2021-01-28Update copyright yearRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13999)
2021-01-19util/check-format.pl: Minor improvements of whitespace checksDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13710)
2020-09-30check-format.pl: Allow nested indentation of labels (not only at line pos 1)Dr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13019)
2020-09-30check-format.pl: Extend exceptions for no SPC after trailing ';' in 'for (...;)'Dr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13019)
2020-09-30check-format.pl: Document how to run positive and negative self-testsDr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13019)
2020-07-20check-format.pl: Report empty lines only if -s (--sloppy-spc) is not usedDr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12270)
2020-07-20check-format.pl: Add check for essentially empty line at beginning of fileDr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12270)
2020-07-20check-format.pl: Add check for multiples essentially empty lines in a rowDr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12270)
2020-07-20check-format.pl: Allow comment start '/*' after opening '(','[','{'Dr. David von Oheimb
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-03-18fix false positive of check-format.pl regarding '#if' on preceding line; ↵Dr. David von Oheimb
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-18make util/check-format.pl script executableDr. David von Oheimb
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-18fix false positive of check-format.pl reporting '{1 stmt}' after multi-line ↵Dr. David von Oheimb
'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-09Renew and extend the tool for checking adherence to C coding style rulesDr. David von Oheimb
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)