| OLD | NEW |
| 1 # This Source Code Form is subject to the terms of the Mozilla Public | 1 # This Source Code Form is subject to the terms of the Mozilla Public |
| 2 # License, v. 2.0. If a copy of the MPL was not distributed with this | 2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 | 4 |
| 5 import sys | 5 import sys |
| 6 import hashlib | 6 import hashlib |
| 7 import re | 7 import re |
| 8 import os | 8 import os |
| 9 from mozbuild.preprocessor import Preprocessor | 9 from mozbuild.preprocessor import Preprocessor |
| 10 from mozbuild.util import DefinesAction | 10 from mozbuild.util import DefinesAction |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 del pp.context[undefine] | 110 del pp.context[undefine] |
| 111 pp.out = StringIO() | 111 pp.out = StringIO() |
| 112 pp.do_filter('substitution') | 112 pp.do_filter('substitution') |
| 113 pp.do_include(filename) | 113 pp.do_include(filename) |
| 114 allowed_dupes.extend([line.partition('#')[0].rstrip() | 114 allowed_dupes.extend([line.partition('#')[0].rstrip() |
| 115 for line in pp.out.getvalue().splitlines()]) | 115 for line in pp.out.getvalue().splitlines()]) |
| 116 | 116 |
| 117 find_dupes(args.directory, bail=not args.warning, allowed_dupes=allowed_dupe
s) | 117 find_dupes(args.directory, bail=not args.warning, allowed_dupes=allowed_dupe
s) |
| 118 | 118 |
| 119 if __name__ == "__main__": | 119 if __name__ == "__main__": |
| 120 main() | 120 # We allow dupes, so we skip this check |
| 121 # See https://issues.adblockplus.org/ticket/7238 |
| 122 print("Skipping find-dupes.py") |
| OLD | NEW |