diff mbox series

[FFmpeg-devel] patcheck: warn missing whitespace between ) and {

Message ID 20201230104251.51335-1-liuqi05@kuaishou.com
State New
Headers show
Series [FFmpeg-devel] patcheck: warn missing whitespace between ) and {
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

liuqi05 Dec. 30, 2020, 10:42 a.m. UTC
Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
---
 tools/patcheck | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Rheinhardt Dec. 30, 2020, 10:54 a.m. UTC | #1
liuqi05:
> Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
> ---
>  tools/patcheck | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/patcheck b/tools/patcheck
> index fe52938f29..ca7b57f29f 100755
> --- a/tools/patcheck
> +++ b/tools/patcheck
> @@ -101,6 +101,7 @@ hiegrep2 "$ERE_TYPES" '(static|av_|ff_|typedef|:\+[^a-zA-Z_])' 'Non static with
>  hiegrep ':\+[^}#]*else' 'missing } prior to else' $*
>  hiegrep '(if|while|for)\(' 'missing whitespace between keyword and ( (feel free to ignore)' $*
>  hiegrep '(else|do){'       'missing whitespace between keyword and { (feel free to ignore)' $*
> +hiegrep '\){'              'missing whitespace between ) and { (feel free to ignore)' $*
>  hiegrep '}(else|while)'    'missing whitespace between } and keyword (feel free to ignore)' $*
>  
>  #FIXME this should print the previous statement maybe
> Missing whitespace is actually common in case of compound literals.

- Andreas
Steven Liu Dec. 30, 2020, 10:58 a.m. UTC | #2
> 2020年12月30日 下午6:54,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> liuqi05:
>> Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
>> ---
>> tools/patcheck | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/tools/patcheck b/tools/patcheck
>> index fe52938f29..ca7b57f29f 100755
>> --- a/tools/patcheck
>> +++ b/tools/patcheck
>> @@ -101,6 +101,7 @@ hiegrep2 "$ERE_TYPES" '(static|av_|ff_|typedef|:\+[^a-zA-Z_])' 'Non static with
>> hiegrep ':\+[^}#]*else' 'missing } prior to else' $*
>> hiegrep '(if|while|for)\(' 'missing whitespace between keyword and ( (feel free to ignore)' $*
>> hiegrep '(else|do){'       'missing whitespace between keyword and { (feel free to ignore)' $*
>> +hiegrep '\){'              'missing whitespace between ) and { (feel free to ignore)' $*
>> hiegrep '}(else|while)'    'missing whitespace between } and keyword (feel free to ignore)' $*
>> 
>> #FIXME this should print the previous statement maybe
>> Missing whitespace is actually common in case of compound literals.
So (feel free to ignore) as above line.
> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
diff mbox series

Patch

diff --git a/tools/patcheck b/tools/patcheck
index fe52938f29..ca7b57f29f 100755
--- a/tools/patcheck
+++ b/tools/patcheck
@@ -101,6 +101,7 @@  hiegrep2 "$ERE_TYPES" '(static|av_|ff_|typedef|:\+[^a-zA-Z_])' 'Non static with
 hiegrep ':\+[^}#]*else' 'missing } prior to else' $*
 hiegrep '(if|while|for)\(' 'missing whitespace between keyword and ( (feel free to ignore)' $*
 hiegrep '(else|do){'       'missing whitespace between keyword and { (feel free to ignore)' $*
+hiegrep '\){'              'missing whitespace between ) and { (feel free to ignore)' $*
 hiegrep '}(else|while)'    'missing whitespace between } and keyword (feel free to ignore)' $*
 
 #FIXME this should print the previous statement maybe