Loading
feat: detect svg as binary files
Description
SVGs are XML-based text files, they contain vector graphics data that creates noise in code search results. This detects SVG files as binary files. The advanced search and chunk modes use this, so this will exclude SVG files from indexing. For context, we have 2,877 SVG files in the gitlab-org/gitlab repository.
I'm using an extension-based detection rather than content scanning because it will be simpler, and we can easily avoid false positives from files containing "svg" text, such as Markdown documentation.
We are also adding a few popular extensions that we want to classify directly as binaries based on their file extensions, while continuing to detect binary code as before.
Related to #165 (closed)
Edited by Arturo Herrero