Changeset View
Standalone View
src/file/fileexcludefilters.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 23 | const char* const s_defaultFileExcludeFilters[] = { | |||
---|---|---|---|---|---|
59 | "*.nvram", | 59 | "*.nvram", | ||
60 | "*.rcore", | 60 | "*.rcore", | ||
61 | "*.swap", | 61 | "*.swap", | ||
62 | "lzo", | 62 | "lzo", | ||
63 | "litmain.sh", | 63 | "litmain.sh", | ||
64 | "*.orig", | 64 | "*.orig", | ||
65 | ".histfile.*", | 65 | ".histfile.*", | ||
66 | ".xsession-errors*", | 66 | ".xsession-errors*", | ||
67 | "*.js.map", | ||||
68 | "*.css.map," | ||||
69 | "*.so", | ||||
broulik: Don't we ignore blobs already? If not, we should also add stuff like `qmlc` and `jsc` | |||||
As far as I can tell, we do not, and they have to be manually listed. I've added qmlc and jsc. Any more you can think of? ngraham: As far as I can tell, we do not, and they have to be manually listed. I've added `qmlc` and… | |||||
bruns: Static library - `.a` | |||||
70 | "*.a", | ||||
71 | "*.db", | ||||
72 | "*.pluginmap", | ||||
73 | "*.qrc", | ||||
67 | 74 | | |||
68 | // Compiled files | 75 | // Compiled files | ||
bruns: Probably `Bytecode` - we have `.o` above, which is also compiled | |||||
69 | "*.class", // Java | 76 | "*.class", // Java | ||
70 | "*.pyc", // Python | 77 | "*.pyc", // Python | ||
78 | "*.pyo", // More Python | ||||
For python2, there is also .pyo (Python3 is covered by the __pycache__ directory filter) bruns: For python2, there is also `.pyo` (Python3 is covered by the `__pycache__` directory filter) | |||||
71 | "*.elc", // Emacs Lisp | 79 | "*.elc", // Emacs Lisp | ||
80 | "*.qmlc", // QML | ||||
broulik: `qrc` is a Qt resource file, not a QML file | |||||
81 | "*.jsc", // Javascript | ||||
82 | "Bytecode", | ||||
Thats not what I meant (I am not aware of anything generating a Bytecode file literally). bruns: Thats not what I meant (I am not aware of anything generating a `Bytecode` file literally).
I… | |||||
ngraham: Heh, oops. | |||||
72 | 83 | | |||
73 | // end of list | 84 | // end of list | ||
74 | nullptr | 85 | nullptr | ||
75 | }; | 86 | }; | ||
76 | 87 | | |||
77 | const int s_defaultFileExcludeFiltersVersion = 2; | 88 | const int s_defaultFileExcludeFiltersVersion = 3; | ||
78 | 89 | | |||
79 | const char* const s_defaultFolderExcludeFilters[] = { | 90 | const char* const s_defaultFolderExcludeFilters[] = { | ||
80 | "po", | 91 | "po", | ||
81 | 92 | | |||
82 | // VCS | 93 | // VCS | ||
83 | "CVS", | 94 | "CVS", | ||
84 | ".svn", | 95 | ".svn", | ||
85 | ".git", | 96 | ".git", | ||
86 | "_darcs", | 97 | "_darcs", | ||
87 | ".bzr", | 98 | ".bzr", | ||
88 | ".hg", | 99 | ".hg", | ||
89 | 100 | | |||
90 | // development | 101 | // development | ||
91 | "CMakeFiles", | 102 | "CMakeFiles", | ||
92 | "CMakeTmp", | 103 | "CMakeTmp", | ||
93 | "CMakeTmpQmake", | 104 | "CMakeTmpQmake", | ||
94 | ".moc", | 105 | ".moc", | ||
95 | ".obj", | 106 | ".obj", | ||
96 | ".pch", | 107 | ".pch", | ||
97 | ".uic", | 108 | ".uic", | ||
109 | ".npm", | ||||
110 | ".yarn", | ||||
111 | ".yarn-cache", | ||||
98 | "__pycache__", | 112 | "__pycache__", | ||
113 | "node_modules", | ||||
114 | "node_packages", | ||||
115 | "nbproject", | ||||
99 | 116 | | |||
100 | //misc | 117 | //misc | ||
101 | "core-dumps", | 118 | "core-dumps", | ||
102 | "lost+found", | 119 | "lost+found", | ||
103 | 120 | | |||
104 | // end of list | 121 | // end of list | ||
105 | nullptr | 122 | nullptr | ||
106 | }; | 123 | }; | ||
107 | 124 | | |||
108 | const int s_defaultFolderExcludeFiltersVersion = 1; | 125 | const int s_defaultFolderExcludeFiltersVersion = 2; | ||
109 | 126 | | |||
110 | const char* const s_sourceCodeMimeTypes[] = { | 127 | const char* const s_sourceCodeMimeTypes[] = { | ||
111 | "text/css", | 128 | "text/css", | ||
112 | "text/x-c++src", | 129 | "text/x-c++src", | ||
113 | "text/x-c++hdr", | 130 | "text/x-c++hdr", | ||
114 | "text/x-csrc", | 131 | "text/x-csrc", | ||
115 | "text/x-chdr", // c header files | 132 | "text/x-chdr", // c header files | ||
116 | "text/x-python", | 133 | "text/x-python", | ||
117 | "text/x-assembly", | 134 | "text/x-assembly", | ||
118 | "text/x-java", | 135 | "text/x-java", | ||
119 | "text/x-objsrc", | 136 | "text/x-objsrc", | ||
120 | "text/x-ruby", | 137 | "text/x-ruby", | ||
121 | "text/x-scheme", | 138 | "text/x-scheme", | ||
122 | "text/x-pascal", | 139 | "text/x-pascal", | ||
140 | "text/x-fortran", | ||||
141 | "text/x-erlang", | ||||
142 | "text/x-cmake", | ||||
143 | "text/x-lua", | ||||
123 | "text/x-yacc", | 144 | "text/x-yacc", | ||
124 | "text/x-sed", | 145 | "text/x-sed", | ||
125 | "text/x-haskell", | 146 | "text/x-haskell", | ||
147 | "text/x-copying", // COPYING files | ||||
148 | "text/x-readme", // README files | ||||
126 | "text/asp", | 149 | "text/asp", | ||
150 | "text/jsx", | ||||
151 | "text/csx", | ||||
152 | "text/vnd.trolltech.linguist", | ||||
cfeck: , | |||||
127 | "application/x-awk", | 153 | "application/x-awk", | ||
128 | "application/x-cgi", | 154 | "application/x-cgi", | ||
Hm, not to sure about this one - SVG typically has RDF metadata, and also everything in <tspan> tags qualifies as "content". bruns: Hm, not to sure about this one - SVG typically has RDF metadata, and also everything in… | |||||
My impression is that Baloo is really intended for user files; SVGs only get their content indexed by accident, because they happen to be textual. I don't think there's any textual content inside an SVG file that you'd actually want to have indexed. ngraham: My impression is that Baloo is really intended for user files; SVGs only get their content… | |||||
SVGs are user files, and anything inside <tspan> is textual content. You can have several paragraphs with text inside SVGs. bruns: SVGs are user files, and anything inside `<tspan>` is textual content. You can have several… | |||||
129 | "application/x-csh", | 155 | "application/x-csh", | ||
130 | "application/x-ipynb+json", | 156 | "application/x-ipynb+json", | ||
131 | "application/x-java", | 157 | "application/x-java", | ||
132 | "application/x-javascript", | 158 | "application/x-javascript", | ||
133 | "application/x-perl", | 159 | "application/x-perl", | ||
134 | "application/x-php", | 160 | "application/x-php", | ||
135 | "application/x-python", | 161 | "application/x-python", | ||
136 | "application/x-sh", | 162 | "application/x-sh", | ||
163 | "application/xml", | ||||
164 | "application/javascript", | ||||
165 | "application/json", | ||||
166 | "application/geo+json", | ||||
167 | "application/json-patch+json", | ||||
168 | "application/ld+json", | ||||
169 | "application/x-ipynb+json", // Jupyter notebooks | ||||
137 | 170 | | |||
138 | // end of list | 171 | // end of list | ||
139 | nullptr | 172 | nullptr | ||
140 | }; | 173 | }; | ||
141 | const int s_sourceCodeMimeTypesVersion = 1; | 174 | const int s_sourceCodeMimeTypesVersion = 2; | ||
142 | } | 175 | } | ||
143 | 176 | | |||
144 | 177 | | |||
145 | QStringList Baloo::defaultExcludeFilterList() | 178 | QStringList Baloo::defaultExcludeFilterList() | ||
146 | { | 179 | { | ||
147 | QStringList l; | 180 | QStringList l; | ||
148 | for (int i = 0; s_defaultFileExcludeFilters[i]; ++i) | 181 | for (int i = 0; s_defaultFileExcludeFilters[i]; ++i) | ||
149 | l << QLatin1String(s_defaultFileExcludeFilters[i]); | 182 | l << QLatin1String(s_defaultFileExcludeFilters[i]); | ||
Show All 30 Lines |
Don't we ignore blobs already? If not, we should also add stuff like qmlc and jsc