Commit cdd571f
authored
Error handling fixes & add nilerr linter (#6776)
* golangci: add nilerr
We already had nilnesserr, but they are separate implementations and
nilerr has open PR gostaticanalysis/nilerr#23
which would have caught a bug in our code.
Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
* agent bootstrap: fix error handling
We were failing to propagate an error in one particular case.
This kind of thing should be caught by the nilerr and nilnesserr
linters, but neither of them does because of the presence of defer in
this function. For nilerr,
gostaticanalysis/nilerr#23 would fix that.
Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
* oidc-discovery-provider: fix missing error check
Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
---------
Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>1 parent 0153ceb commit cdd571f
File tree
5 files changed
+27
-14
lines changed- pkg/agent
- support/oidc-discovery-provider
5 files changed
+27
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | | - | |
| 289 | + | |
| 290 | + | |
289 | 291 | | |
290 | 292 | | |
291 | 293 | | |
| |||
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | | - | |
| 463 | + | |
| 464 | + | |
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| |||
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
572 | | - | |
| 575 | + | |
| 576 | + | |
573 | 577 | | |
574 | 578 | | |
575 | 579 | | |
| |||
719 | 723 | | |
720 | 724 | | |
721 | 725 | | |
722 | | - | |
| 726 | + | |
| 727 | + | |
723 | 728 | | |
724 | 729 | | |
725 | 730 | | |
| |||
781 | 786 | | |
782 | 787 | | |
783 | 788 | | |
784 | | - | |
| 789 | + | |
| 790 | + | |
785 | 791 | | |
786 | 792 | | |
787 | 793 | | |
| |||
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
935 | | - | |
| 941 | + | |
| 942 | + | |
936 | 943 | | |
937 | 944 | | |
938 | 945 | | |
| |||
1059 | 1066 | | |
1060 | 1067 | | |
1061 | 1068 | | |
1062 | | - | |
| 1069 | + | |
| 1070 | + | |
1063 | 1071 | | |
1064 | 1072 | | |
1065 | 1073 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
0 commit comments