@@ -16,10 +16,18 @@ fn test_validate() -> Result<(), Box<dyn Error>> {
1616 CODEOWNERS out of date. Run `codeowners generate` to update the CODEOWNERS file
1717
1818 Code ownership should only be defined for each file in one way. The following files have declared ownership in multiple ways
19- - gems/payroll_calculator/calculator.rb (owner: Payments, source: Owner annotation at the top of the file)
20- - gems/payroll_calculator/calculator.rb (owner: Payroll, source: Owner specified in Team YML's `owned_gems`)
21- - ruby/app/services/multi_owned.rb (owner: Payments, source: Owner annotation at the top of the file)
22- - ruby/app/services/multi_owned.rb (owner: Payroll, source: Owner specified in `ruby/app/services/.codeowner`)
19+
20+ gems/payroll_calculator/calculator.rb
21+ owner: Payments
22+ - Owner annotation at the top of the file
23+ owner: Payroll
24+ - Owner specified in Team YML's `owned_gems`
25+
26+ ruby/app/services/multi_owned.rb
27+ owner: Payments
28+ - Owner annotation at the top of the file
29+ owner: Payroll
30+ - Owner specified in `ruby/app/services/.codeowner`
2331
2432 Found invalid team annotations
2533 - ruby/app/models/blockchain.rb is referencing an invalid team - 'Web3'
@@ -44,7 +52,9 @@ fn test_for_file() -> Result<(), Box<dyn Error>> {
4452 . stdout ( predicate:: eq ( indoc ! { "
4553 Team: Unowned
4654 Team YML: Unowned
47- Description: \n " } ) ) ; // trailing whitespace
55+ Description:
56+ - Unowned
57+ " } ) ) ;
4858 Ok ( ( ) )
4959}
5060
@@ -57,17 +67,18 @@ fn test_for_file_multiple_owners() -> Result<(), Box<dyn Error>> {
5767 . arg ( "ruby/app/services/multi_owned.rb" )
5868 . assert ( )
5969 . success ( )
60- . stdout ( predicate:: str:: starts_with ( "Error: file is owned by multiple teams!" ) )
61- // order not static
62- . stdout ( predicate:: str:: contains ( indoc ! { "
63- Team: Payroll
64- Team YML: config/teams/payroll.yml
65- Description: Owner specified in `ruby/app/services/.codeowner`
66- " } ) )
67- . stdout ( predicate:: str:: contains ( indoc ! { "
70+ . stdout ( predicate:: eq ( indoc ! { "
71+ Error: file is owned by multiple teams!
72+
6873 Team: Payments
6974 Team YML: config/teams/payments.yml
70- Description: Owner annotation at the top of the file
75+ Description:
76+ - Owner annotation at the top of the file
77+
78+ Team: Payroll
79+ Team YML: config/teams/payroll.yml
80+ Description:
81+ - Owner specified in `ruby/app/services/.codeowner`
7182 " } ) ) ;
7283 Ok ( ( ) )
7384}
0 commit comments