Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.43 KB

CUSTOMIZING-CHECKS.md

File metadata and controls

28 lines (23 loc) · 1.43 KB

How to Add Custom Breaking-Changes Checks

Unit Test

  1. Add a unit test for your scenario in one of the test files under checker with a comment "BC: <use-case> is breaking"
  2. Add any acompanying OpenAPI specs under data

Localized Messages

  1. Add localized texts under checker/localizations_src (you can use Google Translate for Russian)
  2. Update localization source file:
    go-localize -input checker/localizations_src -output checker/localizations
    
  3. Make sure that checker/localizations/localizations.go contains the new messages

Write the Checker Function

  1. Create new go file under checker and name it by the breaking-change use case
  2. Create a check func inside the file and name it accordingly
  3. Add the checker func to the defaultChecks or optionalChecks list

Documentation

  1. Optionally, add additional unit tests and comment them with "BC: <use-case> is breaking" or "BC: <use-case> is not breaking"
  2. Update BREAKING-CHANGES-EXAMPLES.md:
    ./scripts/test.sh
    
  3. Make sure that BREAKING-CHANGES-EXAMPLES.md was updated with your use-cases
  4. If your check is optional, also add it to this list of optional checks