File: defaultexclude.go

package info (click to toggle)
reflex 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 172 kB
  • sloc: sh: 24; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

import "regexp"

var defaultExcludes = []string{
	// VCS dirs
	`(^|/)\.jj/`,
	`(^|/)\.git/`,
	`(^|/)\.hg/`,
	// Vim
	`~$`,
	`\.swp$`,
	// Emacs
	`\.#`,
	`(^|/)#.*#$`,
	// OS X
	`(^|/)\.DS_Store$`,
}

var defaultExcludeMatcher multiMatcher

func init() {
	for _, pattern := range defaultExcludes {
		m := newRegexMatcher(regexp.MustCompile(pattern), true)
		defaultExcludeMatcher = append(defaultExcludeMatcher, m)
	}
}