[TIMOB-4975] Implement a source copyright scanner
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-15T18:26:59.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | Tooling |
Labels | copyright, tools |
Reporter | Marshall Culpepper |
Assignee | Eric Merriman |
Created | 2011-08-10T08:33:39.000+0000 |
Updated | 2017-06-15T18:26:59.000+0000 |
Description
We need a source code copyright scanner that can do a few sanity checks:
* Warn if a source file doesn't contain our standard copyright headers
** Source files should include at least: (*.java, *.m, *.mm, *.cpp, *.c, *.h, *.xml, *.js, *.py)
** Make sure not to include third party source files, i.e. android/titanium/thirdparty, iphone/Classes/ASIHttpRequest, etc.
* Warn if the year(s) in the copyright don't match the file timestamps
** i.e. if a file was last modified in 2011, it needs to mention 2011 in the copyright header
The script should automatically scan all source files in the titanium_mobile repository, but it should also accept a list of files as input to scan specifically.
Here's an example of our standard copyright header using a Java comment:
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
This shows copyright years that cover 2009, 2010, and 2011
Closing ticket due to time passed and lack of progress in the past few years. Any problems, please file a new ticket.