Skip to content

Commit 7f65b95

Browse files
committed
Merge branch 'MQE-431' into sprint-develop
2 parents a0a209a + 9498741 commit 7f65b95

33 files changed

+174
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ vendor/*
44
.env
55
_generated
66
AcceptanceTester.php
7+
cghooks.lock

bin/blacklist.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
###################################################################
2+
# Specify directories or files for the copyright-check to ignore. #
3+
# #
4+
# THIS FILE CANNOT CONTAIN BLANK LINES #
5+
###################################################################
6+
bin/blacklist.txt
7+
dev/tests/static/Magento/Sniffs/Annotations/Helper.php
8+
dev/tests/static/Magento/Sniffs/Annotations/RequireAnnotatedAttributesSniff.php
9+
dev/tests/static/Magento/Sniffs/Annotations/RequireAnnotatedMethodsSniff.php

bin/copyright-check

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Copyright © Magento, Inc. All rights reserved.
4+
# See COPYING.txt for license details.
5+
6+
7+
FILE_EXTENSIONS='.php\|.xml\|.xsd'
8+
BLACKLIST='bin/blacklist.txt'
9+
RESULT=''
10+
11+
# Iterate through the list of tracked files
12+
# that have the expected extensions
13+
# that are not ignored
14+
for i in `git ls-tree --full-tree -r --name-only HEAD | grep $FILE_EXTENSIONS | grep -v -f $BLACKLIST`
15+
do
16+
if echo `cat $i` | grep -q -v "Copyright © Magento, Inc. All rights reserved."; then
17+
# Copyright is missing
18+
RESULT+="$i\n"
19+
fi
20+
done
21+
22+
if [[ ! -z $RESULT ]]; then
23+
printf "\nTHE FOLLOWING FILES ARE MISSING THE MAGENTO COPYRIGHT:\n\n"
24+
printf " Copyright © Magento, Inc. All rights reserved.\n"
25+
printf " See COPYING.txt for license details.\n\n"
26+
printf "$RESULT\n"
27+
exit 1
28+
fi
29+
30+
# Success!
31+
exit 0

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@
1111
},
1212
"require-dev": {
1313
"squizlabs/php_codesniffer": "1.5.3",
14-
"sebastian/phpcpd": "~3.0"
14+
"sebastian/phpcpd": "~3.0",
15+
"brainmaestro/composer-git-hooks": "^2.3"
1516
},
1617
"autoload": {
1718
"psr-4": {
1819
"Magento\\FunctionalTestingFramework\\": ["src/Magento/FunctionalTestingFramework"]
1920
}
21+
},
22+
"extra": {
23+
"hooks": {
24+
"pre-push": "bin/copyright-check"
25+
}
2026
}
2127
}

src/Magento/FunctionalTestingFramework/Code/Reader/ClassReaderInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
/**
3-
*
4-
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76

src/Magento/FunctionalTestingFramework/Config/Converter/Dom/Flat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento\FunctionalTestingFramework\Config\Converter\Dom;

src/Magento/FunctionalTestingFramework/Config/FileResolver/Mask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © 2017 Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

src/Magento/FunctionalTestingFramework/Config/FileResolver/Root.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22
/**
3-
* Copyright © 2017 Magento. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\FunctionalTestingFramework\Config\FileResolver;
78

89
use Magento\FunctionalTestingFramework\Config\FileResolverInterface;

src/Magento/FunctionalTestingFramework/Data/Argument/Interpreter/ArrayType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento\FunctionalTestingFramework\Data\Argument\Interpreter;

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/DataObjectHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
26

37
namespace Magento\FunctionalTestingFramework\DataGenerator\Handlers;
48

0 commit comments

Comments
 (0)