WordPress / WordPress/theme-check

Copyright Check False Positive

Open
#481 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
371
Forks
113
Avg merge
8m
Merged PRs (30d)
5

Description

Theme Check is incorrectly returning a WARNING on the Copyright check, for a Theme with both a GNU-recommended formatting for Copyright notice and also with "License:" and ":License URI:" tags present in style.css.

Here is an example of the Copyright notice that is returning a false positive:

* Oenology WordPress Theme, Copyright (C) 2010-2016 Chip Bennett
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * Note: see the "Oenology Reference" admin page for copyright and 
 * license information for bundled resources, including fonts and icons

This should return at best INFO, not WARNING, as both "Copyright" and "(C)" - the explicitly searched-for strings - are included. (Understanding that parsing the verbiage could be beyond the ability of the regex here.)

Perhaps a "Copyright:" tag is needed/would resolve the issue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Copyright check and the logic that emits its WARNING for theme style.css headers. Reproduce the check with the Oenology copyright notice and its License tags; done means this format no longer produces a WARNING and is reported at INFO or better.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.