@@ -16,10 +16,18 @@ fn test_validate() -> Result<(), Box<dyn Error>> {
16
16
CODEOWNERS out of date. Run `codeowners generate` to update the CODEOWNERS file
17
17
18
18
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`
23
31
24
32
Found invalid team annotations
25
33
- ruby/app/models/blockchain.rb is referencing an invalid team - 'Web3'
@@ -44,7 +52,9 @@ fn test_for_file() -> Result<(), Box<dyn Error>> {
44
52
. stdout ( predicate:: eq ( indoc ! { "
45
53
Team: Unowned
46
54
Team YML: Unowned
47
- Description: \n " } ) ) ; // trailing whitespace
55
+ Description:
56
+ - Unowned
57
+ " } ) ) ;
48
58
Ok ( ( ) )
49
59
}
50
60
@@ -57,17 +67,18 @@ fn test_for_file_multiple_owners() -> Result<(), Box<dyn Error>> {
57
67
. arg ( "ruby/app/services/multi_owned.rb" )
58
68
. assert ( )
59
69
. 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
+
68
73
Team: Payments
69
74
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`
71
82
" } ) ) ;
72
83
Ok ( ( ) )
73
84
}
0 commit comments