From 04d3af82184dc3c74f09236bfd53b258ad6977b2 Mon Sep 17 00:00:00 2001 From: Kazuki Okamoto Date: Sat, 4 Jul 2020 17:35:59 +0900 Subject: [PATCH] convert to Windows paths --- src/Analyser/Configuration.elm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Analyser/Configuration.elm b/src/Analyser/Configuration.elm index be081aa7..4a511711 100644 --- a/src/Analyser/Configuration.elm +++ b/src/Analyser/Configuration.elm @@ -2,6 +2,8 @@ module Analyser.Configuration exposing (Configuration, checkEnabled, checkProper import Dict exposing (Dict) import Json.Decode as JD exposing (Decoder) +import List +import String type Configuration @@ -23,7 +25,11 @@ checkEnabled k (Configuration configuration) = isPathExcluded : String -> Configuration -> Bool isPathExcluded p (Configuration { excludedPaths }) = - List.any (\a -> String.startsWith a p) excludedPaths + let + winPaths = + List.map (String.replace "/" "\\") excludedPaths + in + List.any (\a -> String.startsWith a p) (excludedPaths ++ winPaths) defaultChecks : Dict String Bool