Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

License header checks #4

Open
wants to merge 4 commits into
base: feature/sniffs
Choose a base branch
from

Conversation

michalbundyra
Copy link
Member

@michalbundyra michalbundyra commented Apr 1, 2018

Adds license header sniff and MD files sniff

  • check all files for license header
  • check contents of MD files if match with templates from maintainers repository
  • sniff to check if COPYTIGHT.md and LICENSE.md files exists in the repo, and create them (it's a bit hacky, because sniffs works only on existing files, so we run this sniff only ONCE on first found token)

Replaces #2
Please have a look on commits dc3d49b and e7528fe

/cc @xtreamwayz @weierophinney

@michalbundyra michalbundyra force-pushed the feature/license-headers branch 2 times, most recently from 4482b10 to 672614f Compare April 3, 2018 09:20
public $templates = [
// @phpcs:disable Generic.Files.LineLength.TooLong
'LICENSE.md' => 'https://raw.githubusercontent.com/zendframework/maintainers/master/template/LICENSE.md',
'COPYRIGHT.md' => 'Copyright (c) {year}, Zend Technologies USA, Inc.' . "\n",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we have string here, so the sniff supports string or url to the template.
We should change it to the link once we have confirmed template in maintainers repo.

See: zendframework/maintainers#44

@geerteltink geerteltink mentioned this pull request Apr 3, 2018
28 tasks
@michalbundyra michalbundyra added this to the 2.0.0 milestone Apr 3, 2018
@michalbundyra michalbundyra force-pushed the feature/license-headers branch 2 times, most recently from 1ddd35d to 77588a8 Compare April 3, 2018 13:50
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at laminas/laminas-coding-standard#10.

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-coding-standard. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-coding-standard to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-coding-standard.
  • In your clone of laminas/laminas-coding-standard, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants