Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1686)

Side by Side Diff: tools/checklicenses/checklicenses.py

Issue 26718002: Remove references to sconsbuild (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Makes sure that all files contain proper licensing information.""" 6 """Makes sure that all files contain proper licensing information."""
7 7
8 8
9 import optparse 9 import optparse
10 import os.path 10 import os.path
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 print "\nFAILED\n" 486 print "\nFAILED\n"
487 return 1 487 return 1
488 488
489 success = True 489 success = True
490 for line in stdout.splitlines(): 490 for line in stdout.splitlines():
491 filename, license = line.split(':', 1) 491 filename, license = line.split(':', 1)
492 filename = os.path.relpath(filename.strip(), options.base_directory) 492 filename = os.path.relpath(filename.strip(), options.base_directory)
493 493
494 # All files in the build output directory are generated one way or another. 494 # All files in the build output directory are generated one way or another.
495 # There's no need to check them. 495 # There's no need to check them.
496 if filename.startswith('out/') or filename.startswith('sconsbuild/'): 496 if filename.startswith('out/'):
Lei Zhang 2013/10/09 18:59:14 Do bots still have a sconsbuild symlink? Can we ac
Nico 2013/10/09 19:22:25 If so, we can remove those symlinks, right?
497 continue 497 continue
498 498
499 # For now we're just interested in the license. 499 # For now we're just interested in the license.
500 license = license.replace('*No copyright*', '').strip() 500 license = license.replace('*No copyright*', '').strip()
501 501
502 # Skip generated files. 502 # Skip generated files.
503 if 'GENERATED FILE' in license: 503 if 'GENERATED FILE' in license:
504 continue 504 continue
505 505
506 if license in WHITELISTED_LICENSES: 506 if license in WHITELISTED_LICENSES:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 option_parser.add_option('--ignore-suppressions', 547 option_parser.add_option('--ignore-suppressions',
548 action='store_true', 548 action='store_true',
549 default=False, 549 default=False,
550 help='Ignore path-specific license whitelist.') 550 help='Ignore path-specific license whitelist.')
551 options, args = option_parser.parse_args() 551 options, args = option_parser.parse_args()
552 return check_licenses(options, args) 552 return check_licenses(options, args)
553 553
554 554
555 if '__main__' == __name__: 555 if '__main__' == __name__:
556 sys.exit(main()) 556 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698