[gnome-builder/gnome-builder-3-28] todo: aggressively ignore more data from todo



commit 7570867e6e26fd64c618098f7e664c12e1f62905
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 31 14:38:28 2018 -0700

    todo: aggressively ignore more data from todo
    
    The todo module has an optimization to avoid lots of small strings being
    allocated. In doing so, we potentially pull in data that we cannot know
    we need to ignore until after it has been delivered from the subprocess.
    
    This tries to ignore node_modules, a commonly used directory for npm
    dependencies from even beeing scanned by grep.
    
    Related to #509

 src/plugins/todo/gbp-todo-model.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/plugins/todo/gbp-todo-model.c b/src/plugins/todo/gbp-todo-model.c
index 375903148..858cdb497 100644
--- a/src/plugins/todo/gbp-todo-model.c
+++ b/src/plugins/todo/gbp-todo-model.c
@@ -64,6 +64,7 @@ static const gchar *exclude_dirs[] = {
   ".flatpak-builder",
   ".git",
   ".svn",
+  "node_modules",
 };
 
 /* This is an optimization to avoid reading files in from disk that
@@ -71,6 +72,8 @@ static const gchar *exclude_dirs[] = {
  * for that information.
  */
 static const gchar *exclude_files[] = {
+  "*~",
+  "*.swp",
   "*.m4",
   "*.po",
   "*.min.js.*",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]