Skip to content

Commit

Permalink
Merge pull request #3 from HydraWiki/develop
Browse files Browse the repository at this point in the history
Add fixer for All Rights Reserved to proprietary
  • Loading branch information
valeryan authored Sep 24, 2018
2 parents 128dfbf + 18adb03 commit 0a8b4d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class LicenseCommentSniff implements Sniff {
private $replacements = [
'GNU General Public Licen[sc]e 2(\.0)? or later' => 'GPL-2.0-or-later',
'GNU GPL v2\+' => 'GPL-2.0-or-later',
'All Rights Reserved(\.)?' => 'Proprietary'
];

/**
Expand Down Expand Up @@ -262,7 +263,7 @@ private function handleInvalidLicense($tag, $next, $license) {
// Make sure the entire license matches the regex, and
// then a sanity check that the new replacement is valid too
if (preg_match("/^$regex$/", $license) === 1
&& $spdx->validate($identifier)
&& ($spdx->validate($identifier) || $this->isValidProprietaryLicense($identifier))
) {
$fixable = $identifier;
break;
Expand Down

0 comments on commit 0a8b4d4

Please sign in to comment.