|
| 1 | +from collections import OrderedDict |
| 2 | +from .filters import * |
| 3 | +from .lexers import * |
| 4 | + |
| 5 | +# Dictionary of custom per-projects settings. |
| 6 | +# filters: |
| 7 | +# Projects not present in this dictionary only use default_filters. |
| 8 | +# Use `*` to unpack filter lists defined above, |
| 9 | +# you can pass additional options to filters by putting a Filter |
| 10 | +# class and a dictionary with options in a tuple, like this: |
| 11 | +# (FilterCls, {"option": True}). |
| 12 | +# Check filter files and utils.py for information about available options |
| 13 | +projects = { |
| 14 | + 'amazon-freertos': { |
| 15 | + 'filters': [ |
| 16 | + *default_filters, |
| 17 | + MakefileSubdirFilter, |
| 18 | + ], |
| 19 | + }, |
| 20 | + 'arm-trusted-firmware': { |
| 21 | + 'filters': [ |
| 22 | + *default_filters, |
| 23 | + CppPathIncFilter, |
| 24 | + ], |
| 25 | + }, |
| 26 | + 'barebox': { |
| 27 | + 'filters': [ |
| 28 | + *default_filters, |
| 29 | + DtsiFilter, |
| 30 | + *common_kconfig_filters, |
| 31 | + CppPathIncFilter, |
| 32 | + *common_makefile_filters, |
| 33 | + ], |
| 34 | + }, |
| 35 | + 'coreboot': { |
| 36 | + 'filters': [ |
| 37 | + *default_filters, |
| 38 | + DtsiFilter, |
| 39 | + *common_kconfig_filters, |
| 40 | + *common_makefile_filters, |
| 41 | + ], |
| 42 | + }, |
| 43 | + 'linux': { |
| 44 | + 'filters': [ |
| 45 | + *default_filters, |
| 46 | + DtsiFilter, |
| 47 | + *common_kconfig_filters, |
| 48 | + *common_makefile_filters, |
| 49 | + # include/uapi contains includes to user headers under #ifndef __KERNEL__ |
| 50 | + # Our solution is to ignore all includes in such paths |
| 51 | + (CppPathIncFilter, {"path_exceptions": {'^/include/uapi/.*'}}), |
| 52 | + ], |
| 53 | + 'lexers': OrderedDict({ |
| 54 | + r'.*\.(c|h|cpp|hpp|c++|cxx|cc)': CLexer, |
| 55 | + r'makefile\..*': MakefileLexer, |
| 56 | + r'.*\.dts(i)?': DTSLexer, |
| 57 | + r'kconfig.*': KconfigLexer, #TODO negative lookahead for .rst |
| 58 | + |
| 59 | + r'/arch/alpha/.*\.s': (GasLexer, {"arch": "alpha"}), |
| 60 | + r'/arch/arc/.*\.s': (GasLexer, {"arch": "arc"}), |
| 61 | + r'/arch/arm/.*\.s': (GasLexer, {"arch": "arm32"}), |
| 62 | + r'/arch/csky/.*\.s': (GasLexer, {"arch": "csky"}), |
| 63 | + r'/arch/m68k/.*\.s': (GasLexer, {"arch": "m68k"}), |
| 64 | + r'/arch/microblaze/.*\.s': (GasLexer, {"arch": "microblaze"}), |
| 65 | + r'/arch/mips/.*\.s': (GasLexer, {"arch": "mips"}), |
| 66 | + r'/arch/openrisc/.*\.s': (GasLexer, {"arch": "openrisc"}), |
| 67 | + r'/arch/parisc/.*\.s': (GasLexer, {"arch": "parisc"}), |
| 68 | + r'/arch/s390/.*\.s': (GasLexer, {"arch": "s390"}), |
| 69 | + r'/arch/sh/.*\.s': (GasLexer, {"arch": "sh"}), |
| 70 | + r'/arch/sparc/.*\.s': (GasLexer, {"arch": "sparc"}), |
| 71 | + r'/arch/um/.*\.s': (GasLexer, {"arch": "x86"}), |
| 72 | + r'/arch/x86/.*\.s': (GasLexer, {"arch": "x86"}), |
| 73 | + r'/arch/xtensa/.*\.s': (GasLexer, {"arch": "xtensa"}), |
| 74 | + r'.*\.s': GasLexer, |
| 75 | + }), |
| 76 | + }, |
| 77 | + 'qemu': { |
| 78 | + 'filters': [ |
| 79 | + *default_filters, |
| 80 | + *common_kconfig_filters, |
| 81 | + ], |
| 82 | + }, |
| 83 | + 'u-boot': { |
| 84 | + 'filters': [ |
| 85 | + *default_filters, |
| 86 | + DtsiFilter, |
| 87 | + *common_kconfig_filters, |
| 88 | + CppPathIncFilter, |
| 89 | + *common_makefile_filters, |
| 90 | + ], |
| 91 | + 'lexers': OrderedDict({ |
| 92 | + r'.*\.(c|h|cpp|hpp|c++|cxx|cc)': CLexer, |
| 93 | + r'makefile\..*': MakefileLexer, |
| 94 | + r'.*\.dts(i)?': DTSLexer, |
| 95 | + r'kconfig.*': KconfigLexer, #TODO negative lookahead for .rst |
| 96 | + |
| 97 | + r'/arch/arc/.*\.s': (GasLexer, {"arch": "arc"}), |
| 98 | + r'/arch/arm/.*\.s': (GasLexer, {"arch": "arm32"}), |
| 99 | + r'/arch/m68k/.*\.s': (GasLexer, {"arch": "m68k"}), |
| 100 | + r'/arch/microblaze/.*\.s': (GasLexer, {"arch": "microblaze"}), |
| 101 | + r'/arch/mips/.*\.s': (GasLexer, {"arch": "mips"}), |
| 102 | + r'/arch/riscv/.*\.s': (GasLexer, {"arch": "riscv"}), |
| 103 | + r'/arch/sh/.*\.s': (GasLexer, {"arch": "sh"}), |
| 104 | + r'/arch/x86/.*\.s': (GasLexer, {"arch": "x86"}), |
| 105 | + r'/arch/sandbox/.*\.s': (GasLexer, {"arch": "x86"}), |
| 106 | + r'/arch/xtensa/.*\.s': (GasLexer, {"arch": "xtensa"}), |
| 107 | + r'.*\.s': GasLexer, |
| 108 | + }), |
| 109 | + }, |
| 110 | + 'uclibc-ng': { |
| 111 | + 'filters': [ |
| 112 | + *default_filters, |
| 113 | + ConfigInFilter, |
| 114 | + ], |
| 115 | + }, |
| 116 | + 'zephyr': { |
| 117 | + 'filters': [ |
| 118 | + *default_filters, |
| 119 | + DtsiFilter, |
| 120 | + *common_kconfig_filters, |
| 121 | + CppPathIncFilter, |
| 122 | + ], |
| 123 | + }, |
| 124 | +} |
| 125 | + |
0 commit comments