* `git ls-files -- '*.go' | xargs gofmt -s -w` * driver: unexport InternalOptions This was an exported method that returned an internal type, so it's unlikely that anyone depends on its presence. * internal/binutils: remove newline in error string golint reported: error strings should not be capitalized or end with punctuation or a newline * internal/driver: s/buildId/buildID/ per golint * internal/elfexec: remove punctuation in error string golint reported: error strings should not be capitalized or end with punctuation or a newline * internal/graph: correct comment Found with golint. * internal/graph: add method comment golint reported: exported method Edge.WeightValue should have comment or be unexported * internal/report: remove newline in error string golint reported: error strings should not be capitalized or end with punctuation or a newline * *: remove unused code Found with honnef.co/go/tools/cmd/unused: internal/binutils/disasm_test.go:137:8: const objdump is unused (U1000) internal/driver/driver_test.go:353:6: type testProfile is unused (U1000) internal/graph/graph.go:838:6: func countEdges is unused (U1000) profile/proto.go:148:6: func encodeStringOpt is unused (U1000) * *: simply code Found with honnef.co/go/tools/cmd/gosimple: internal/driver/commands.go:471:24: should omit comparison to bool constant, can be simplified to !b (S1002) internal/driver/driver.go:163:5: should omit comparison to bool constant, can be simplified to !trim (S1002) internal/driver/driver.go:168:5: should omit comparison to bool constant, can be simplified to !focus (S1002) internal/driver/driver.go:172:5: should omit comparison to bool constant, can be simplified to !tagfocus (S1002) internal/driver/driver.go:176:5: should omit comparison to bool constant, can be simplified to !hide (S1002) internal/graph/dotgraph.go:213:34: should use make(map[string][]*Tag) instead (S1019) internal/report/report.go:1061:3: should replace loop with label = append(label, rpt.options.ProfileLabels...) (S1011) profile/proto.go:157:5: should omit comparison to bool constant, can be simplified to !x (S1002) * *: correct mistakes Found with honnef.co/go/tools/cmd/staticcheck: driver/driver.go:280:20: infinite recursive call (SA5007) internal/driver/driver_focus.go:54:11: this value of err is never used (SA4006) profile/proto.go:74:32: x | 0 always equals x (SA4016) * Add linters to .travis.yml
|
||
2 | 2 |
|
3 | 3 |
|
4 | 4 |
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
||
29 | 29 |
|
30 | 30 |
|
31 | 31 |
|
32 |
|
|
32 |
|
|
33 | 33 |
|
34 | 34 |
|
35 |
|
|
35 |
|
|
36 | 36 |
|
37 | 37 |
|
38 | 38 |
|
|
||
273 | 273 |
|
274 | 274 |
|
275 | 275 |
|
276 |
|
|
276 |
|
|
277 | 277 |
|
278 | 278 |
|
279 | 279 |
|
280 |
|
|
280 |
|
|
281 | 281 |
|
|
||
73 | 73 |
|
74 | 74 |
|
75 | 75 |
|
76 |
|
|
76 |
|
|
77 | 77 |
|
78 | 78 |
|
79 | 79 |
|
|
||
134 | 134 |
|
135 | 135 |
|
136 | 136 |
|
137 |
|
|
138 |
|
|
139 | 137 |
|
140 | 138 |
|
141 | 139 |
|
|
||
468 | 468 |
|
469 | 469 |
|
470 | 470 |
|
471 |
|
|
471 |
|
|
472 | 472 |
|
473 | 473 |
|
474 | 474 |
|
|
||
160 | 160 |
|
161 | 161 |
|
162 | 162 |
|
163 |
|
|
163 |
|
|
164 | 164 |
|
165 | 165 |
|
166 | 166 |
|
167 | 167 |
|
168 |
|
|
168 |
|
|
169 | 169 |
|
170 | 170 |
|
171 | 171 |
|
172 |
|
|
172 |
|
|
173 | 173 |
|
174 | 174 |
|
175 | 175 |
|
176 |
|
|
176 |
|
|
177 | 177 |
|
178 | 178 |
|
179 | 179 |
|
|
||
59 | 59 |
|
60 | 60 |
|
61 | 61 |
|
62 |
|
|
62 |
|
|
63 | 63 |
|
64 | 64 |
|
65 | 65 |
|
|
||
350 | 350 |
|
351 | 351 |
|
352 | 352 |
|
353 |
|
|
354 |
|
|
355 |
|
|
356 | 353 |
|
357 | 354 |
|
358 | 355 |
|
|
||
548 | 545 |
|
549 | 546 |
|
550 | 547 |
|
551 |
|
|
552 |
|
|
548 |
|
|
549 |
|
|
553 | 550 |
|
554 | 551 |
|
555 | 552 |
|
556 | 553 |
|
557 | 554 |
|
558 | 555 |
|
559 |
|
|
560 |
|
|
556 |
|
|
557 |
|
|
561 | 558 |
|
562 | 559 |
|
563 | 560 |
|
564 | 561 |
|
565 | 562 |
|
566 | 563 |
|
567 |
|
|
568 |
|
|
564 |
|
|
565 |
|
|
569 | 566 |
|
570 | 567 |
|
571 | 568 |
|
572 | 569 |
|
573 | 570 |
|
574 | 571 |
|
575 |
|
|
576 |
|
|
572 |
|
|
573 |
|
|
577 | 574 |
|
578 | 575 |
|
579 | 576 |
|
|
||
750 | 747 |
|
751 | 748 |
|
752 | 749 |
|
753 |
|
|
750 |
|
|
754 | 751 |
|
755 | 752 |
|
756 | 753 |
|
757 | 754 |
|
758 | 755 |
|
759 | 756 |
|
760 |
|
|
757 |
|
|
761 | 758 |
|
762 | 759 |
|
763 | 760 |
|
764 | 761 |
|
765 | 762 |
|
766 | 763 |
|
767 |
|
|
764 |
|
|
768 | 765 |
|
769 | 766 |
|
770 | 767 |
|
771 | 768 |
|
772 | 769 |
|
773 | 770 |
|
774 |
|
|
771 |
|
|
775 | 772 |
|
776 | 773 |
|
777 | 774 |
|
|
||
1051 | 1048 |
|
1052 | 1049 |
|
1053 | 1050 |
|
1054 |
|
|
1051 |
|
|
1055 | 1052 |
|
1056 | 1053 |
|
1057 | 1054 |
|
|
||
1067 | 1064 |
|
1068 | 1065 |
|
1069 | 1066 |
|
1070 |
|
|
1067 |
|
|
1071 | 1068 |
|
1072 | 1069 |
|
1073 | 1070 |
|
|
||
131 | 131 |
|
132 | 132 |
|
133 | 133 |
|
134 |
|
|
134 |
|
|
135 | 135 |
|
136 | 136 |
|
137 | 137 |
|
|
||
50 | 50 |
|
51 | 51 |
|
52 | 52 |
|
53 |
|
|
53 |
|
|
54 | 54 |
|
55 | 55 |
|
56 | 56 |
|
|
||
210 | 210 |
|
211 | 211 |
|
212 | 212 |
|
213 |
|
|
213 |
|
|
214 | 214 |
|
215 | 215 |
|
216 | 216 |
|
|
||
240 | 240 |
|
241 | 241 |
|
242 | 242 |
|
243 |
|
|
243 |
|
|
244 | 244 |
|
245 | 245 |
|
246 |
|
|
246 |
|
|
247 | 247 |
|
248 | 248 |
|
249 | 249 |
|
250 |
|
|
250 |
|
|
251 | 251 |
|
252 | 252 |
|
253 | 253 |
|
254 | 254 |
|
255 |
|
|
255 |
|
|
256 | 256 |
|
257 | 257 |
|
258 | 258 |
|
|
||
240 | 240 |
|
241 | 241 |
|
242 | 242 |
|
243 |
|
|
244 |
|
|
243 | 245 |
|
244 | 246 |
|
245 | 247 |
|
|
||
832 | 834 |
|
833 | 835 |
|
834 | 836 |
|
835 |
|
|
836 |
|
|
837 |
|
|
838 |
|
|
839 |
|
|
840 |
|
|
841 |
|
|
842 |
|
|
843 |
|
|
844 |
|
|
845 |
|
|
846 | 837 |
|
847 | 838 |
|
848 | 839 |
|
|
||
1058 | 1058 |
|
1059 | 1059 |
|
1060 | 1060 |
|
1061 |
|
|
1062 |
|
|
1063 |
|
|
1061 |
|
|
1064 | 1062 |
|
1065 | 1063 |
|
1066 | 1064 |
|
|
||
167 | 167 |
|
168 | 168 |
|
169 | 169 |
|
170 |
|
|
170 |
|
|
171 | 171 |
|
172 | 172 |
|
173 | 173 |
|
|
||
207 | 207 |
|
208 | 208 |
|
209 | 209 |
|
210 |
|
|
211 |
|
|
212 |
|
|
213 |
|
|
214 |
|
|
210 |
|
|
211 |
|
|
212 |
|
|
213 |
|
|
214 |
|
|
215 | 215 |
|
216 | 216 |
|
217 | 217 |
|
|
||
212 | 212 |
|
213 | 213 |
|
214 | 214 |
|
215 |
|
|
215 |
|
|
216 | 216 |
|
217 | 217 |
|
218 | 218 |
|
|
||
230 | 230 |
|
231 | 231 |
|
232 | 232 |
|
233 |
|
|
234 |
|
|
233 |
|
|
234 |
|
|
235 | 235 |
|
236 | 236 |
|
237 | 237 |
|
238 | 238 |
|
239 | 239 |
|
240 | 240 |
|
241 |
|
|
242 |
|
|
241 |
|
|
242 |
|
|
243 | 243 |
|
244 | 244 |
|
245 | 245 |
|
246 | 246 |
|
247 | 247 |
|
248 | 248 |
|
249 |
|
|
250 |
|
|
249 |
|
|
250 |
|
|
251 | 251 |
|
252 | 252 |
|
253 | 253 |
|
254 | 254 |
|
255 | 255 |
|
256 | 256 |
|
257 |
|
|
258 |
|
|
257 |
|
|
258 |
|
|
259 | 259 |
|
260 | 260 |
|
261 | 261 |
|
262 | 262 |
|
263 | 263 |
|
264 | 264 |
|
265 |
|
|
266 |
|
|
265 |
|
|
266 |
|
|
267 | 267 |
|
268 | 268 |
|
269 | 269 |
|
|
||
273 | 273 |
|
274 | 274 |
|
275 | 275 |
|
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 | 280 |
|
281 | 281 |
|
282 | 282 |
|
|
||
71 | 71 |
|
72 | 72 |
|
73 | 73 |
|
74 |
|
|
74 |
|
|
75 | 75 |
|
76 | 76 |
|
77 | 77 |
|
|
||
145 | 145 |
|
146 | 146 |
|
147 | 147 |
|
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
|
|
154 |
|
|
155 | 148 |
|
156 | 149 |
|
157 | 150 |
|
|
||
161 | 154 |
|
162 | 155 |
|
163 | 156 |
|
164 |
|
|
165 |
|
|
157 |
|
|
158 |
|
|
166 | 159 |
|
167 |
|
|
168 | 160 |
|
169 | 161 |
|
170 | 162 |
|
|
||
100 | 100 |
|
101 | 101 |
|
102 | 102 |
|
103 |
|
|
104 |
|
|
103 |
|
|
104 |
|
|
105 | 105 |
|
106 | 106 |
|
107 | 107 |
|
|
||
109 | 109 |
|
110 | 110 |
|
111 | 111 |
|
112 |
|
|
113 |
|
|
112 |
|
|
113 |
|
|
114 | 114 |
|
115 | 115 |
|
116 |
|
|
117 |
|
|
116 |
|
|
117 |
|
|
118 | 118 |
|
119 | 119 |
|
120 | 120 |
|