| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 the V8 project authors. All rights reserved. |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 def GetPathsToSearch(self): | 169 def GetPathsToSearch(self): |
| 170 return ['.'] | 170 return ['.'] |
| 171 | 171 |
| 172 def IgnoreDir(self, name): | 172 def IgnoreDir(self, name): |
| 173 return (super(SourceProcessor, self).IgnoreDir(name) | 173 return (super(SourceProcessor, self).IgnoreDir(name) |
| 174 or (name == 'third_party') | 174 or (name == 'third_party') |
| 175 or (name == 'obj')) | 175 or (name == 'obj')) |
| 176 | 176 |
| 177 IGNORE_COPYRIGHTS = ['earley-boyer.js', 'raytrace.js', 'crypto.js', | 177 IGNORE_COPYRIGHTS = ['earley-boyer.js', 'raytrace.js', 'crypto.js', |
| 178 'libraries.cc', 'libraries-empty.cc'] | 178 'libraries.cc', 'libraries-empty.cc', 'jsmin.py'] |
| 179 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', | 179 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', |
| 180 'html-comments.js'] | 180 'html-comments.js'] |
| 181 | 181 |
| 182 def ProcessContents(self, name, contents): | 182 def ProcessContents(self, name, contents): |
| 183 result = True | 183 result = True |
| 184 base = basename(name) | 184 base = basename(name) |
| 185 if not base in SourceProcessor.IGNORE_TABS: | 185 if not base in SourceProcessor.IGNORE_TABS: |
| 186 if '\t' in contents: | 186 if '\t' in contents: |
| 187 print "%s contains tabs" % name | 187 print "%s contains tabs" % name |
| 188 result = False | 188 result = False |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 success = CppLintProcessor().Run(workspace) and success | 220 success = CppLintProcessor().Run(workspace) and success |
| 221 success = SourceProcessor().Run(workspace) and success | 221 success = SourceProcessor().Run(workspace) and success |
| 222 if success: | 222 if success: |
| 223 return 0 | 223 return 0 |
| 224 else: | 224 else: |
| 225 return 1 | 225 return 1 |
| 226 | 226 |
| 227 | 227 |
| 228 if __name__ == '__main__': | 228 if __name__ == '__main__': |
| 229 sys.exit(Main()) | 229 sys.exit(Main()) |
| OLD | NEW |