test: errors: rename tests like check command's checks
This commit is contained in:
		
							parent
							
								
									2b2d643333
								
							
						
					
					
						commit
						f7625343f6
					
				| @ -1,17 +1,37 @@ | |||||||
| Here are journals for reproducing all of hledger's journal error messages. | Here are journals/scripts for reproducing hledger's journal error messages. | ||||||
| Each has an easy command at the top for reproducing in the CLI. | They are named similarly to [hledger check][]'s checks. | ||||||
| Some have additional declarations to help with reproducing in Emacs with flycheck-hledger. |  | ||||||
| 
 | 
 | ||||||
| hledger error messages are still pretty inconsistent.  | In the CLI, execute them to see the error messages (`./showall`). | ||||||
| Tools like https://github.com/DamienCassou/flycheck-hledger parse them and need updating whenever they change. |  | ||||||
| Related: https://github.com/simonmichael/hledger/issues/1436. |  | ||||||
| 
 | 
 | ||||||
|  | In Emacs with [flycheck-hledger][],  | ||||||
|  | customize flycheck-hledger-* to enable all appropriate checks, | ||||||
|  | and open the files to see how flycheck handles them. | ||||||
|  | Some files contain extra declarations to ease flycheck testing. | ||||||
|  | 
 | ||||||
|  | [hledger-check]:    https://hledger.org/hledger.html#check | ||||||
|  | [flycheck-hledger]: https://github.com/DamienCassou/flycheck-hledger  | ||||||
|  | [#1436]:            https://github.com/simonmichael/hledger/issues/1436 | ||||||
|  | 
 | ||||||
|  | hledger error messages are currently quite varied in format. | ||||||
|  | Tools like flycheck-hledger parse them and need updating | ||||||
|  | whenever they change ([#1436][]). | ||||||
| Getting consistent high-quality errors and accurate flycheck region | Getting consistent high-quality errors and accurate flycheck region | ||||||
| highlighting, not to mention LSP support, for all of our journal | highlighting, not to mention LSP support, for all of our journal | ||||||
| errors is a big project. | errors is a big project, but it's crowd-sourceable and any progress | ||||||
| But (once we converge on a standard format) it's quite crowd-sourceable,  | brings immediate practical benefits. Here is the approximate current status: | ||||||
| tackling each error separately, and any progress means immediate practical benefits. | 
 | ||||||
| Below is the approximate status of hledger's error messages and related tool support. | |                   | consistent | accurate line | accurate column | flycheck detects | flycheck region | | ||||||
|  | |-------------------|------------|---------------|-----------------|------------------|-----------------| | ||||||
|  | | parseable         |            |               |                 | Y                |                 | | ||||||
|  | | parseable-dates   |            |               |                 | Y                |                 | | ||||||
|  | | parseable-regexps |            |               |                 | Y                |                 | | ||||||
|  | | balanced          |            |               |                 | Y                |                 | | ||||||
|  | | assertions        |            |               |                 | Y                |                 | | ||||||
|  | | accounts          |            |               |                 | Y                |                 | | ||||||
|  | | commodities       |            |               |                 | Y                |                 | | ||||||
|  | | payees            |            |               |                 | Y                |                 | | ||||||
|  | | ordereddates      |            |               |                 | Y                |                 | | ||||||
|  | | uniqueleafnames   |            |               |                 | Y                |                 | | ||||||
| 
 | 
 | ||||||
| Key: | Key: | ||||||
| - consistent: the error message follows a consistent format | - consistent: the error message follows a consistent format | ||||||
| @ -19,16 +39,3 @@ Key: | |||||||
| - accurate column - the optimal column(s) is(are) selected | - accurate column - the optimal column(s) is(are) selected | ||||||
| - flycheck detects - flycheck recognises the error output, reports the error and doesn't give a "suspicious" warning | - flycheck detects - flycheck recognises the error output, reports the error and doesn't give a "suspicious" warning | ||||||
| - flycheck shows region - flycheck highlights the text region containing the error | - flycheck shows region - flycheck highlights the text region containing the error | ||||||
| 
 |  | ||||||
| |                           | consistent | accurate line | accurate column | flycheck detects | flycheck region | |  | ||||||
| |---------------------------|------------|---------------|-----------------|------------------|-----------------| |  | ||||||
| | failing-balance-assertion |            |               |                 | Y                |                 | |  | ||||||
| | invalid-date              |            |               |                 | Y                |                 | |  | ||||||
| | invalid-regex             |            |               |                 | Y                |                 | |  | ||||||
| | nonunique-leaf-names      |            |               |                 | Y                |                 | |  | ||||||
| | parse-error               |            |               |                 | Y                |                 | |  | ||||||
| | unbalanced-txn            |            |               |                 | Y                |                 | |  | ||||||
| | undeclared-acct           |            |               |                 | Y                |                 | |  | ||||||
| | undeclared-commodity      |            |               |                 | Y                |                 | |  | ||||||
| | undeclared-payee          |            |               |                 | Y                |                 | |  | ||||||
| | unordered-dates           |            |               |                 | Y                |                 | |  | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user