Skip to content

Commit

Permalink
Remove unused constants
Browse files Browse the repository at this point in the history
  • Loading branch information
radiospiel committed Oct 7, 2020
1 parent 85bb325 commit 7a08e5a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions lib/ex_minimatch/compiler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ defmodule ExMinimatch.Compiler do
@qmark ExMinimatcher.qmark
@globstar ExMinimatcher.globstar
@star ExMinimatcher.star
@two_star_dot ExMinimatcher.two_star_dot
@two_star_no_dot ExMinimatcher.two_star_no_dot
@re_specials ExMinimatcher.re_specials
@slash_split ExMinimatcher.slash_split

Expand Down
5 changes: 0 additions & 5 deletions lib/ex_minimatch/matcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ defmodule ExMinimatch.Matcher do
import Dict, only: [merge: 2]
import ExMinimatch.Helper

@qmark ExMinimatcher.qmark
@globstar ExMinimatcher.globstar
@star ExMinimatcher.star
@two_star_dot ExMinimatcher.two_star_dot
@two_star_no_dot ExMinimatcher.two_star_no_dot
@re_specials ExMinimatcher.re_specials
@slash_split ExMinimatcher.slash_split

def match_file(file, %ExMinimatcher{pattern: regex_parts_set, negate: negate, options: options}) do
Expand Down
11 changes: 0 additions & 11 deletions lib/ex_minimatcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ defmodule ExMinimatcher do
@star "#{@qmark}*?"
def star, do: @star

# ** when dots are allowed. Anything goes, except .. and .
# not (^ or / followed by one or two dots followed by $ or /),
# followed by anything, any number of times.
@two_star_dot "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
def two_star_dot, do: @two_star_dot

# not a ^ or / followed by a dot,
# followed by anything, any number of times.
@two_star_no_dot "(?:(?!(?:\\\/|^)\\.).)*?"
def two_star_no_dot, do: @two_star_no_dot

# characters that need to be escaped in RegExp.
@re_specials [ "(", ")", ".", "*", "{", "}", "+", "?", "[", "]", "^", "$", "\\", "!" ]
def re_specials, do: @re_specials
Expand Down

0 comments on commit 7a08e5a

Please sign in to comment.