mirror of
https://github.com/joshuaclayton/unused.git
synced 2024-10-26 13:19:58 +03:00
Allow allowedTerms and autoLowLikelihood to be optional configs
This commit is contained in:
parent
9cc640aef7
commit
5c4e0c1ccd
@ -41,8 +41,8 @@ data Matcher = Term Position String | Path Position String | AppOccurrences Int
|
||||
instance FromJSON LanguageConfiguration where
|
||||
parseJSON (Y.Object o) = LanguageConfiguration
|
||||
<$> o .: "name"
|
||||
<*> o .: "allowedTerms"
|
||||
<*> o .: "autoLowLikelihood"
|
||||
<*> o .:? "allowedTerms" .!= []
|
||||
<*> o .:? "autoLowLikelihood" .!= []
|
||||
<*> o .:? "aliases" .!= []
|
||||
parseJSON _ = mzero
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user