File tree Expand file tree Collapse file tree 3 files changed +24
-16
lines changed Expand file tree Collapse file tree 3 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 1+ # Specify directories or files for the copyright-check to ignore.
2+ #
3+ # e.g.
4+ # path/to/directory
5+ # path/to/file.php
6+ #
7+ # THIS FILE CANNOT CONTAIN BLANK LINES
8+ #
9+ dev/tests/static/Magento/Sniffs/Annotations
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- IGNORE_PATH=' bin/copyright-ignore.txt'
4- FILE_EXTENSIONS_TO_CHECK=' .php\|.xml\|.xsd'
5-
3+ FILE_EXTENSIONS=' .php\|.xml\|.xsd'
4+ BLACKLIST=' bin/blacklist.txt'
65RESULT=' '
76
8- # Iterate through all php, xml, and xsd files that are part of the Git repo
9- # (excluding any matching lines from the ignore file)
10- for i in ` git ls-tree --full-tree -r --name-only HEAD | grep $FILE_EXTENSIONS_TO_CHECK | grep -v -f $IGNORE_PATH `
7+ # Iterate through the list of tracked files
8+ # that have the expected extensions
9+ # that are not ignored
10+ for i in ` git ls-tree --full-tree -r --name-only HEAD | grep $FILE_EXTENSIONS | grep -v -f $BLACKLIST `
1111do
12- if echo ` cat $i ` | grep -q -v " Copyright © Magento, Inc. All rights reserved." ; then
13- # Copyright is missing
14- RESULT+=" $i \n"
15- fi
12+ if echo ` cat $i ` | grep -q -v " Copyright © Magento, Inc. All rights reserved." ; then
13+ # Copyright is missing
14+ RESULT+=" $i \n"
15+ fi
1616done
1717
1818if [[ ! -z $RESULT ]]; then
19- printf " \nTHE FOLLOWING FILES ARE MISSING THE MAGENTO COPYRIGHT:\n\n"
20- printf " Copyright © Magento, Inc. All rights reserved.\n"
21- printf " See COPYING.txt for license details.\n\n"
22- printf " $RESULT \n"
23- exit 1
19+ printf " \nTHE FOLLOWING FILES ARE MISSING THE MAGENTO COPYRIGHT:\n\n"
20+ printf " Copyright © Magento, Inc. All rights reserved.\n"
21+ printf " See COPYING.txt for license details.\n\n"
22+ printf " $RESULT \n"
23+ exit 1
2424fi
2525
2626# Success!
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments