]> git.sesse.net Git - ffmpeg/blob - tests/fate/source-check.sh
avformat/matroskaenc: write DisplayWidth and DisplayHeight elements only if they...
[ffmpeg] / tests / fate / source-check.sh
1 #!/bin/sh
2
3 cd "$1"/..
4
5 git show > /dev/null 2> /dev/null || { cat tests/ref/fate/source ; exit 0; }
6
7 echo Files without standard license headers:
8 git grep -L -E "This file is part of FFmpeg|This file is part of libswresample|"\
9 "Permission to use, copy, modify, and/or distribute this software for any|"\
10 "Permission is hereby granted, free of charge, to any person|"\
11 "Permission is hereby granted to use, copy, modify, and distribute this|"\
12 "Permission is granted to anyone to use this software for any purpose|"\
13 "This work is licensed under the terms of the GNU GPL|"\
14 "Redistribution and use in source and binary forms, with or without modification|"\
15 "This library is free software; you can redistribute it and/or|"\
16 "This program is free software; you can redistribute it and/or modify|"\
17 "This file is placed in the public domain" | grep -E '\.c$|\.h$|\.S$|\.asm$'
18
19 echo Headers without standard inclusion guards:
20 for f in `git ls-files | grep '\.h$'` ; do
21     macro="`echo $f | sed \
22         -e 's/^lib//' \
23         -e 's/[^A-Za-z0-9]\{1,\}/_/g' \
24         -e 's/_af_/_/' \
25         -e 's/_vf_/_/' \
26         -e 's/_avf_/_/' \
27         -e 's/_vaf_/_/' \
28     | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
29
30     grep -L "^#define $macro$" $f
31 done
32
33 exit 0