github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/_utils/terror_gen/README.md (about) 1 # Terror check tool 2 3 ## Principle 4 5 * gen.go: read and parse the ast of error_list file to generate current error information, and generate checker_generated.go 6 * checker_template.go: code template for checker 7 * checker_generated.go: check whether current errors have conflict with the previous version, checklist as follows: 8 - check each error that is not newly added in develop version has the same error code with the release version 9 - check each error in develop version has a unique error code 10 * errors_release.txt: generated error information list 11 12 ## Run 13 14 Run `check.sh` will automatically check the valid of error list, if no conflict is detected, errors_release.txt will be updated with latest error list. Each time we change errors definition in error_list, we must run `make terror_check`, which will call `check.sh` directly.