bin: name hledger-check-dupes like other validation commands
This commit is contained in:
		
							parent
							
								
									e2faf08088
								
							
						
					
					
						commit
						abfd6394ee
					
				| @ -20,7 +20,7 @@ import qualified Data.Text as T | ||||
| 
 | ||||
| ------------------------------------------------------------------------------ | ||||
| cmdmode = hledgerCommandMode | ||||
|   [here| dupes | ||||
|   [here| check-dupes | ||||
| Reports duplicates in the account tree: account names having the same leaf | ||||
| but different prefixes. In other words, two or more leaves that are | ||||
| categorized differently. | ||||
| @ -37,7 +37,7 @@ http://stefanorodighiero.net/software/hledger-dupes.html | ||||
| main = do | ||||
|   opts <- getHledgerCliOpts cmdmode | ||||
|   withJournalDo opts $ \CliOpts{rawopts_=_opts,reportopts_=_ropts} j -> do | ||||
|     mapM_ render $ dupes $ accountsNames j | ||||
|     mapM_ render $ checkdupes $ accountsNames j | ||||
| 
 | ||||
| accountsNames :: Journal -> [(String, AccountName)] | ||||
| accountsNames j = map leafAndAccountName as | ||||
| @ -46,8 +46,8 @@ accountsNames j = map leafAndAccountName as | ||||
|         as = nub $ sort $ map paccount ps | ||||
| 
 | ||||
| 
 | ||||
| dupes :: (Ord k, Eq k) => [(k, v)] -> [(k, [v])] | ||||
| dupes l = zip dupLeafs dupAccountNames | ||||
| checkdupes :: (Ord k, Eq k) => [(k, v)] -> [(k, [v])] | ||||
| checkdupes l = zip dupLeafs dupAccountNames | ||||
|   where dupLeafs = map (fst . head) d | ||||
|         dupAccountNames = map (map snd) d | ||||
|         d = dupes' l | ||||
| @ -94,9 +94,9 @@ checks more powerful account balance assertions. | ||||
| [hledger-check-dates.hs](https://github.com/simonmichael/hledger/blob/master/bin/hledger-check-dates.hs#L15) | ||||
| checks that journal entries are ordered by date. | ||||
| 
 | ||||
| ### dupes | ||||
| ### check-dupes | ||||
| 
 | ||||
| [hledger-dupes.hs](https://github.com/simonmichael/hledger/blob/master/bin/hledger-dupes.hs#L21) | ||||
| [hledger-check-dupes.hs](https://github.com/simonmichael/hledger/blob/master/bin/hledger-check-dupes.hs#L21) | ||||
| checks for account names sharing the same leaf name. | ||||
| 
 | ||||
| ### equity | ||||
|  | ||||
| @ -119,7 +119,7 @@ Some experimental commands are not built in to hledger, but | ||||
| [add-on commands](http://hledger.org/hledger.html#add-on-commands), such as:\ | ||||
| `chart`, | ||||
| `check-dates`, | ||||
| `dupes`, | ||||
| `check-dupes`, | ||||
| `equity`, | ||||
| `print-unique`, | ||||
| `register-match`, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user