robocop

Checks KYC attributes against sanction lists
Log | Files | Refs | Submodules | README | LICENSE

commit 3288a7aa23f02f9fa8c401aa457eebd42443c5df
parent 5d507be0ade78e3f300d331e7e8caf30bccc4b5e
Author: Vint Leenaars <vl.software@leenaa.rs>
Date:   Thu,  8 May 2025 22:20:08 +0200

Remove trailing spaces

Diffstat:
Msrc/KYCheck/Config.hs | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/KYCheck/Config.hs b/src/KYCheck/Config.hs @@ -33,7 +33,7 @@ inputToConfig dhall commandline = d_pts = fromIntegral $ dhall_threshold_points dhall d_conf = realToFrac $ dhall_threshold_confidence dhall d_pp = fromIntegral $ dhall_perfect_points dhall - d_addr = fromIntegral $ dhall_weight_address dhall + d_addr = fromIntegral $ dhall_weight_address dhall d_date = fromIntegral $ dhall_weight_date dhall d_id = fromIntegral $ dhall_weight_id dhall d_name = fromIntegral $ dhall_weight_name dhall @@ -41,12 +41,12 @@ inputToConfig dhall commandline = in case commandline of Just cl -> Config { verbosity = case cl_verbosity cl of Just v -> v; Nothing -> d_v - , ssl_location = case cl_ssl_location cl of Just l -> l; Nothing -> d_ssl + , ssl_location = case cl_ssl_location cl of Just l -> l; Nothing -> d_ssl , threshold_ratio = case cl_threshold_ratio cl of Just p -> p; Nothing -> d_pct , threshold_points = case cl_threshold_points cl of Just p -> p; Nothing -> d_pts , threshold_confidence = case cl_threshold_confidence cl of Just p -> p; Nothing -> d_conf , perfect_points = case cl_perfect_points cl of Just p -> p; Nothing -> d_pp - , weight_address = case cl_weight_address cl of Just p -> p; Nothing -> d_addr + , weight_address = case cl_weight_address cl of Just p -> p; Nothing -> d_addr , weight_date = case cl_weight_date cl of Just p -> p; Nothing -> d_date , weight_id = case cl_weight_id cl of Just p -> p; Nothing -> d_id , weight_name = case cl_weight_name cl of Just p -> p; Nothing -> d_name @@ -58,14 +58,14 @@ inputToConfig dhall commandline = , threshold_points = d_pts , threshold_confidence = d_conf , perfect_points = d_pp - , weight_address = d_addr + , weight_address = d_addr , weight_date = d_date , weight_id = d_id , weight_name = d_name , weight_nationality = d_nat } -checkConfig :: Config -> IO Bool +checkConfig :: Config -> IO Bool checkConfig config = do valid_ssl <- checkSSL config valid_points <- checkPoints config @@ -100,7 +100,7 @@ checkPoints config = do ] threshold = threshold_points config when (total < threshold) - $ do (handleError v . Left) + $ do (handleError v . Left) $ KYCheck_InvalidDistribution $ T.pack ("Total points obtainable (" ++ show total ++ ") lower than threshold (" ++ show threshold ++ ")") when (threshold_ratio config < 0 || threshold_ratio config > 1) @@ -161,7 +161,7 @@ commandLine = CommandLine ( long "input" <> metavar "FILENAME" <> help "Location of Swiss Sanction List" ) ) - <*> optional ( option auto + <*> optional ( option auto ( long "threshold-ratio" <> metavar "Float" <> help "Ratio between 0-1" ) ) @@ -169,15 +169,15 @@ commandLine = CommandLine ( long "threshold-points" <> metavar "Integer" <> help "Points needed to flag entry as match" ) ) - <*> optional ( option auto + <*> optional ( option auto ( long "threshold-confidence" <> metavar "Float" <> help "Minimum confidence level between 0-1" ) ) - <*> optional ( option auto + <*> optional ( option auto ( long "perfect-points" <> metavar "Integer" <> help "Amount of points required to get a 100% confidence result" ) ) - <*> optional ( option auto + <*> optional ( option auto ( long "address-weight" <> metavar "Integer" <> help "Points given to a 100% address match" ) )