Merge pull request #401 from BestAwperEver/s2-is-alive #755
reviewdog [golangci-lint] report
reported by reviewdog 🐶
Findings (117)
pkg/demoinfocs/s2_commands.go|42| 42-56 lines are duplicate of pkg/demoinfocs/s2_commands.go:147-161
(dupl)
pkg/demoinfocs/s2_commands.go|147| 147-161 lines are duplicate of pkg/demoinfocs/s2_commands.go:42-56
(dupl)
pkg/demoinfocs/sendtables2/entity.go|436| Function 'OnPacketEntities' has too many statements (46 > 40) (funlen)
pkg/demoinfocs/sendtables2/parser.go|148| Function 'ParsePacket' is too long (76 > 60) (funlen)
pkg/demoinfocs/sendtables2/quantizedfloat.go|148| Function 'newQuantizedFloatDecoder' is too long (99 > 60) (funlen)
pkg/demoinfocs/datatables.go|366| Function 'bindNewPlayerPawnS2' is too long (70 > 60) (funlen)
pkg/demoinfocs/parsing.go|323| Function 'parseFrameS2' is too long (67 > 60) (funlen)
pkg/demoinfocs/stringtables.go|207| Function 'processStringTableS1' is too long (75 > 60) (funlen)
pkg/demoinfocs/stringtables.go|297| Function 'parseStringTable' is too long (113 > 60) (funlen)
pkg/demoinfocs/parser.go|423 col 31| string PBDEMS2
has 3 occurrences, make it a constant (goconst)
pkg/demoinfocs/sendtables2/field_decoder.go|233 col 2| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
pkg/demoinfocs/common/equipment.go|346 col 2| switchTrue: replace 'switch true {}' with 'switch {}' (gocritic)
pkg/demoinfocs/sendtables2/entity.go|562| pkg/demoinfocs/sendtables2/entity.go:562: Line contains TODO/BUG/FIXME: "FIXME: maybe we should panic("didn't con..." (godox)
pkg/demoinfocs/sendtables2/field_decoder.go|44| pkg/demoinfocs/sendtables2/field_decoder.go:45: Line contains TODO/BUG/FIXME: "FIXME: dotabuff/manta doesn't have these..." (godox)
pkg/demoinfocs/common/player.go|465| pkg/demoinfocs/common/player.go:465: Line contains TODO/BUG/FIXME: "TODO Find out where we can find the velo..." (godox)
pkg/demoinfocs/common/player.go|572| pkg/demoinfocs/common/player.go:572: Line contains TODO/BUG/FIXME: "TODO change this func return type to uin..." (godox)
pkg/demoinfocs/common/player_test.go|327| pkg/demoinfocs/common/player_test.go:328: Line contains TODO/BUG/FIXME: "TODO: fix for CS2" (godox)
pkg/demoinfocs/net_messages.go|100| pkg/demoinfocs/net_messages.go:100: Line contains TODO/BUG/FIXME: "FIXME: combine with above" (godox)
pkg/demoinfocs/parsing.go|347| pkg/demoinfocs/parsing.go:347: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
pkg/demoinfocs/parsing.go|359| pkg/demoinfocs/parsing.go:359: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
pkg/demoinfocs/parsing.go|393| pkg/demoinfocs/parsing.go:393: Line contains TODO/BUG/FIXME: "FIXME: refactor to interface instead of ..." (godox)
pkg/demoinfocs/s2_commands.go|314| pkg/demoinfocs/s2_commands.go:314: Line contains TODO/BUG/FIXME: "TODO: taken from dotabuff/manta. do we r..." (godox)
pkg/demoinfocs/s2_commands.go|348| pkg/demoinfocs/s2_commands.go:348: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
pkg/demoinfocs/stringtables.go|147| pkg/demoinfocs/stringtables.go:147: Line contains TODO/BUG/FIXME: "FIXME: We never got a proper CreateStrin..." (godox)
pkg/demoinfocs/stringtables.go|598| pkg/demoinfocs/stringtables.go:598: Line contains TODO/BUG/FIXME: "TODO: what to do with userInfo.GetSteami..." (godox)
pkg/demoinfocs/sendtables2/entity.go|471 col 3| if cmd&0x01 == 0
has complex nested blocks (complexity: 14) (nestif)
pkg/demoinfocs/sendtables2/parser.go|168 col 4| if !ok
has complex nested blocks (complexity: 9) (nestif)
pkg/demoinfocs/sendtables2/quantizedfloat.go|152 col 2| if *bitCount == 0 || *bitCount >= 32
has complex nested blocks (complexity: 5) (nestif)
pkg/demoinfocs/stringtables.go|346 col 3| if hasKey
has complex nested blocks (complexity: 10) (nestif)
pkg/demoinfocs/stringtables.go|380 col 3| if hasValue
has complex nested blocks (complexity: 10) (nestif)
pkg/demoinfocs/datatables.go|544 col 3| if s2
has complex nested blocks (complexity: 7) (nestif)
pkg/demoinfocs/s2_commands.go|320 col 3| if m.t < int32(msgs2.SVC_Messages_svc_ServerInfo)
has complex nested blocks (complexity: 7) (nestif)
pkg/demoinfocs/datatables.go|505 col 4| if entityID != constants.EntityHandleIndexMaskSource2
has complex nested blocks (complexity: 5) (nestif)
pkg/demoinfocs/sendtables2/huffman.go|113 col 2| Consider pre-allocating trees
(prealloc)
pkg/demoinfocs/sendtables/st_parser.go|84 col 36| unused-parameter: parameter 'h' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/sendtables2/entity.go|520 col 5| unreachable-code: unreachable code after this statement (revive)
pkg/demoinfocs/sendtables2/class.go|11 col 2| var-naming: struct field classId should be classID (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|211 col 11| superfluous-else: if block ends with a break statement, so drop this else and outdent its block (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|11 col 7| var-naming: don't use underscores in Go names; const qff_rounddown should be qffRounddown (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|12 col 7| var-naming: don't use underscores in Go names; const qff_roundup should be qffRoundup (revive)
pkg/demoinfocs/sendtables2/serializer.go|64 col 6| var-naming: func serializerId should be serializerID (revive)
pkg/demoinfocs/sendtables2/huffman.go|31 col 1| receiver-naming: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (revive)
pkg/demoinfocs/sendtables2/parser.go|56 col 2| var-naming: struct field classIdSize should be classIDSize (revive)
pkg/demoinfocs/sendtables2/entity.go|359 col 18| var-naming: method GetClassId should be GetClassID (revive)
pkg/demoinfocs/sendtables2/reader.go|261 col 2| redefines-builtin-id: redefinition of the built-in function len (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|13 col 7| var-naming: don't use underscores in Go names; const qff_encode_zero should be qffEncodeZero (revive)
pkg/demoinfocs/sendtables2/parser.go|58 col 2| var-naming: struct field classesById should be classesByID (revive)
pkg/demoinfocs/sendtables2/huffman.go|36 col 1| receiver-naming: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (revive)
pkg/demoinfocs/sendtables2/reader.go|266 col 9| indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
pkg/demoinfocs/sendtables2/entity.go|443 col 3| var-naming: var classId should be classID (revive)
pkg/demoinfocs/sendtables2/parser.go|122 col 3| var-naming: var classId should be classID (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|14 col 7| var-naming: don't use underscores in Go names; const qff_encode_integers should be qffEncodeIntegers (revive)
pkg/demoinfocs/sendtables2/huffman.go|41 col 1| receiver-naming: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (revive)
pkg/demoinfocs/sendtables2/parser.go|65 col 31| unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/sendtables2/entity.go|561 col 40| empty-block: this block is empty, you can remove it (revive)
pkg/demoinfocs/sendtables2/quantizedfloat.go|156 col 9| indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
pkg/demoinfocs/sendtables2/entity.go|164 col 30| unused-parameter: parameter 'reader' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/sendtables2/huffman.go|89 col 9| indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
pkg/demoinfocs/events/events_test.go|62 col 50| unused-parameter: parameter 'handle' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/common/common_test.go|184 col 50| unused-parameter: parameter 'handle' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/fake/participants.go|58 col 42| unused-parameter: parameter 'handle' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/stringtables.go|415 col 62| unused-parameter: parameter 'br' seems to be unused, consider removing or renaming it as _ (revive)
pkg/demoinfocs/sendtables2/huffman.go|71 col 20| unnecessary conversion (unconvert)
pkg/demoinfocs/sendtables2/huffman.go|75 col 20| unnecessary conversion (unconvert)
pkg/demoinfocs/sendtables2/reader.go|262 col 31| unnecessary conversion (unconvert)
pkg/demoinfocs/sendtables2/class.go|78 col 17| func (*class).getTypeForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/serializer.go|22 col 22| func (*serializer).getTypeForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/class.go|82 col 17| func (*class).getDecoderForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/entity.go|169 col 2| const serverClassPlayer
is unused (unused)
pkg/demoinfocs/sendtables2/entity.go|179 col 18| func (*Entity).isPlayer
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|19 col 2| field parentName
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|32 col 2| field value
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|41 col 17| func (*field).modelString
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|130 col 17| func (*field).getName
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|134 col 17| func (*field).getFieldForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/serializer.go|34 col 22| func (*serializer).getFieldForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/field.go|187 col 17| func (*field).getTypeForFieldPath
is unused (unused)
pkg/demoinfocs/sendtables2/field_decoder.go|293 col 6| func handleDecoder
is unused (unused)
pkg/demoinfocs/sendtables2/field_patch.go|25 col 22| func (*fieldPatch).shouldApply
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|24 col 18| func (*reader).remBits
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|28 col 18| func (*reader).position
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|94 col 18| func (*reader).readLeUint32
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|145 col 18| func (*reader).readVarInt64
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|160 col 18| func (*reader).readFloat
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|205 col 18| func (*reader).readStringN
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|303 col 18| func (*reader).readBitsAsBytes
is unused (unused)
pkg/demoinfocs/sendtables2/serializer.go|14 col 22| func (*serializer).id
is unused (unused)
pkg/demoinfocs/sendtables2/reader.go|177| unnecessary trailing newline (whitespace)
pkg/demoinfocs/sendtables2/entity.go|189 col 2| assignments should only be cuddled with other assignments (wsl)
pkg/demoinfocs/sendtables2/entity.go|282 col 2| return statements should not be cuddled if block has more than two lines (wsl)
pkg/demoinfocs/sendtables2/entity.go|290 col 2| if statements should only be cuddled with assignments (wsl)
pkg/demoinfocs/sendtables2/entity.go|297 col 3| only cuddled expressions if assigning variable or using from line above (wsl)
pkg/demoinfocs/sendtables2/entity.go|298 col 3| return statements should not be cuddled if block has more than two lines (wsl)
pkg/demoinfocs/sendtables2/entity.go|300 col 2| assignments should only be cuddled with other assignments (wsl)
pkg/demoinfocs/sendtables2/entity.go|326 col 2| return statements should not be cuddled if block has more than two lines (wsl)
pkg/demoinfocs/sendtables2/entity.go|390 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/demoinfocs/sendtables2/field.go|119 col 3| assignments should only be cuddled with other assignments (wsl)
pkg/demoinfocs/sendtables2/field.go|273 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/demoinfocs/sendtables2/field.go|292 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/demoinfocs/sendtables2/field.go|304 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/demoinfocs/sendtables2/field_decoder.go|379 col 3| only one cuddle assignment allowed before if statement (wsl)
pkg/demoinfocs/sendtables2/field_decoder.go|382 col 3| if statements should only be cuddled with assignments (wsl)
pkg/demoinfocs/sendtables2/field_decoder.go|385 col 3| if statements should only be cuddled with assignments (wsl)
pkg/demoinfocs/sendtables2/field_path.go|327 col 4| only cuddled expressions if assigning variable or using from line above (wsl)
pkg/demoinfocs/sendtables2/field_state.go|16 col 2| only one cuddle assignment allowed before for statement (wsl)
pkg/demoinfocs/sendtables2/field_state.go|35 col 2| only one cuddle assignment allowed before for statement (wsl)
pkg/demoinfocs/sendtables2/reader.go|110 col 3| only one cuddle assignment allowed before if statement (wsl)
pkg/demoinfocs/sendtables2/reader.go|106 col 2| for statement without condition should never be cuddled (wsl)
pkg/demoinfocs/sendtables2/reader.go|131 col 2| for statement without condition should never be cuddled (wsl)
pkg/demoinfocs/sendtables2/reader.go|178 col 2| block should not end with a whitespace (or comment) (wsl)
pkg/demoinfocs/sendtables2/reader.go|217 col 3| append only allowed to cuddle with appended value (wsl)
pkg/demoinfocs/sendtables2/reader.go|212 col 2| for statement without condition should never be cuddled (wsl)
pkg/demoinfocs/datatables.go|805 col 2| declarations should never be cuddled (wsl)
pkg/demoinfocs/stringtables.go|332 col 3| declarations should never be cuddled (wsl)
pkg/demoinfocs/sendtables2/entity.go|521 col 5| unreachable: unreachable code (govet)
pkg/demoinfocs/common/equipment.go|470 col 1| ST1022: comment on exported var EquipmentIndexMapping should be of the form "EquipmentIndexMapping ..." (stylecheck)
pkg/demoinfocs/datatables.go|589 col 7| directive //nolint:wsl
is unused for linter "wsl" (nolintlint)
Filtered Findings (0)
Annotations
Check failure on line 42 in pkg/demoinfocs/s2_commands.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/s2_commands.go#L42
42-56 lines are duplicate of `pkg/demoinfocs/s2_commands.go:147-161` (dupl)
Raw output
pkg/demoinfocs/s2_commands.go:42: 42-56 lines are duplicate of `pkg/demoinfocs/s2_commands.go:147-161` (dupl)
var netMsgCreators = map[msgs2.NET_Messages]NetMessageCreator{
msgs2.NET_Messages_net_NOP: func() proto.Message { return &msgs2.CNETMsg_NOP{} },
msgs2.NET_Messages_net_Disconnect: func() proto.Message { return &msgs2.CNETMsg_Disconnect{} },
msgs2.NET_Messages_net_SplitScreenUser: func() proto.Message { return &msgs2.CNETMsg_SplitScreenUser{} },
msgs2.NET_Messages_net_Tick: func() proto.Message { return &msgs2.CNETMsg_Tick{} },
msgs2.NET_Messages_net_StringCmd: func() proto.Message { return &msgs2.CNETMsg_StringCmd{} },
msgs2.NET_Messages_net_SetConVar: func() proto.Message { return &msgs2.CNETMsg_SetConVar{} },
msgs2.NET_Messages_net_SignonState: func() proto.Message { return &msgs2.CNETMsg_SignonState{} },
msgs2.NET_Messages_net_SpawnGroup_Load: func() proto.Message { return &msgs2.CNETMsg_SpawnGroup_Load{} },
msgs2.NET_Messages_net_SpawnGroup_ManifestUpdate: func() proto.Message { return &msgs2.CNETMsg_SpawnGroup_ManifestUpdate{} },
msgs2.NET_Messages_net_SpawnGroup_SetCreationTick: func() proto.Message { return &msgs2.CNETMsg_SpawnGroup_SetCreationTick{} },
msgs2.NET_Messages_net_SpawnGroup_Unload: func() proto.Message { return &msgs2.CNETMsg_SpawnGroup_Unload{} },
msgs2.NET_Messages_net_SpawnGroup_LoadCompleted: func() proto.Message { return &msgs2.CNETMsg_SpawnGroup_LoadCompleted{} },
msgs2.NET_Messages_net_DebugOverlay: func() proto.Message { return &msgs2.CNETMsg_DebugOverlay{} },
}
Check failure on line 147 in pkg/demoinfocs/s2_commands.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/s2_commands.go#L147
147-161 lines are duplicate of `pkg/demoinfocs/s2_commands.go:42-56` (dupl)
Raw output
pkg/demoinfocs/s2_commands.go:147: 147-161 lines are duplicate of `pkg/demoinfocs/s2_commands.go:42-56` (dupl)
var gameEventCreators = map[msgs2.EBaseGameEvents]NetMessageCreator{
msgs2.EBaseGameEvents_GE_VDebugGameSessionIDEvent: func() proto.Message { return &msgs2.CMsgVDebugGameSessionIDEvent{} },
msgs2.EBaseGameEvents_GE_PlaceDecalEvent: func() proto.Message { return &msgs2.CMsgPlaceDecalEvent{} },
msgs2.EBaseGameEvents_GE_ClearWorldDecalsEvent: func() proto.Message { return &msgs2.CMsgClearWorldDecalsEvent{} },
msgs2.EBaseGameEvents_GE_ClearEntityDecalsEvent: func() proto.Message { return &msgs2.CMsgClearEntityDecalsEvent{} },
msgs2.EBaseGameEvents_GE_ClearDecalsForSkeletonInstanceEvent: func() proto.Message { return &msgs2.CMsgClearDecalsForSkeletonInstanceEvent{} },
msgs2.EBaseGameEvents_GE_Source1LegacyGameEventList: func() proto.Message { return &msgs2.CMsgSource1LegacyGameEventList{} },
msgs2.EBaseGameEvents_GE_Source1LegacyListenEvents: func() proto.Message { return &msgs2.CMsgSource1LegacyListenEvents{} },
msgs2.EBaseGameEvents_GE_Source1LegacyGameEvent: func() proto.Message { return &msgs2.CMsgSource1LegacyGameEvent{} },
msgs2.EBaseGameEvents_GE_SosStartSoundEvent: func() proto.Message { return &msgs2.CMsgSosStartSoundEvent{} },
msgs2.EBaseGameEvents_GE_SosStopSoundEvent: func() proto.Message { return &msgs2.CMsgSosStopSoundEvent{} },
msgs2.EBaseGameEvents_GE_SosSetSoundEventParams: func() proto.Message { return &msgs2.CMsgSosSetSoundEventParams{} },
msgs2.EBaseGameEvents_GE_SosSetLibraryStackFields: func() proto.Message { return &msgs2.CMsgSosSetLibraryStackFields{} },
msgs2.EBaseGameEvents_GE_SosStopSoundEventHash: func() proto.Message { return &msgs2.CMsgSosStopSoundEventHash{} },
}
Check failure on line 436 in pkg/demoinfocs/sendtables2/entity.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/entity.go#L436
Function 'OnPacketEntities' has too many statements (46 > 40) (funlen)
Raw output
pkg/demoinfocs/sendtables2/entity.go:436: Function 'OnPacketEntities' has too many statements (46 > 40) (funlen)
func (p *Parser) OnPacketEntities(m *msgs2.CSVCMsg_PacketEntities) error {
Check failure on line 148 in pkg/demoinfocs/sendtables2/parser.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/parser.go#L148
Function 'ParsePacket' is too long (76 > 60) (funlen)
Raw output
pkg/demoinfocs/sendtables2/parser.go:148: Function 'ParsePacket' is too long (76 > 60) (funlen)
func (p *Parser) ParsePacket(b []byte) error {
Check failure on line 148 in pkg/demoinfocs/sendtables2/quantizedfloat.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/quantizedfloat.go#L148
Function 'newQuantizedFloatDecoder' is too long (99 > 60) (funlen)
Raw output
pkg/demoinfocs/sendtables2/quantizedfloat.go:148: Function 'newQuantizedFloatDecoder' is too long (99 > 60) (funlen)
func newQuantizedFloatDecoder(bitCount, flags *int32, lowValue, highValue *float32) *quantizedFloatDecoder {
Check failure on line 366 in pkg/demoinfocs/datatables.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/datatables.go#L366
Function 'bindNewPlayerPawnS2' is too long (70 > 60) (funlen)
Raw output
pkg/demoinfocs/datatables.go:366: Function 'bindNewPlayerPawnS2' is too long (70 > 60) (funlen)
func (p *parser) bindNewPlayerPawnS2(pawnEntity st.Entity) {
Check failure on line 323 in pkg/demoinfocs/parsing.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/parsing.go#L323
Function 'parseFrameS2' is too long (67 > 60) (funlen)
Raw output
pkg/demoinfocs/parsing.go:323: Function 'parseFrameS2' is too long (67 > 60) (funlen)
func (p *parser) parseFrameS2() bool {
Check failure on line 207 in pkg/demoinfocs/stringtables.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/stringtables.go#L207
Function 'processStringTableS1' is too long (75 > 60) (funlen)
Raw output
pkg/demoinfocs/stringtables.go:207: Function 'processStringTableS1' is too long (75 > 60) (funlen)
func (p *parser) processStringTableS1(tab createStringTable, br *bit.BitReader) {
Check failure on line 297 in pkg/demoinfocs/stringtables.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/stringtables.go#L297
Function 'parseStringTable' is too long (113 > 60) (funlen)
Raw output
pkg/demoinfocs/stringtables.go:297: Function 'parseStringTable' is too long (113 > 60) (funlen)
func parseStringTable(
Check failure on line 423 in pkg/demoinfocs/parser.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/parser.go#L423
string `PBDEMS2` has 3 occurrences, make it a constant (goconst)
Raw output
pkg/demoinfocs/parser.go:423:31: string `PBDEMS2` has 3 occurrences, make it a constant (goconst)
return p.header.Filestamp == "PBDEMS2"
^
Check failure on line 233 in pkg/demoinfocs/sendtables2/field_decoder.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/field_decoder.go#L233
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
Raw output
pkg/demoinfocs/sendtables2/field_decoder.go:233:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch f.encoder {
^
Check failure on line 346 in pkg/demoinfocs/common/equipment.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/common/equipment.go#L346
switchTrue: replace 'switch true {}' with 'switch {}' (gocritic)
Raw output
pkg/demoinfocs/common/equipment.go:346:2: switchTrue: replace 'switch true {}' with 'switch {}' (gocritic)
switch true {
^
Check failure on line 562 in pkg/demoinfocs/sendtables2/entity.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/entity.go#L562
pkg/demoinfocs/sendtables2/entity.go:562: Line contains TODO/BUG/FIXME: "FIXME: maybe we should panic(\"didn't con..." (godox)
Raw output
pkg/demoinfocs/sendtables2/entity.go:562: pkg/demoinfocs/sendtables2/entity.go:562: Line contains TODO/BUG/FIXME: "FIXME: maybe we should panic(\"didn't con..." (godox)
// FIXME: maybe we should panic("didn't consume all data")
Check failure on line 44 in pkg/demoinfocs/sendtables2/field_decoder.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/sendtables2/field_decoder.go#L44
pkg/demoinfocs/sendtables2/field_decoder.go:45: Line contains TODO/BUG/FIXME: "FIXME: dotabuff/manta doesn't have these..." (godox)
Raw output
pkg/demoinfocs/sendtables2/field_decoder.go:44: pkg/demoinfocs/sendtables2/field_decoder.go:45: Line contains TODO/BUG/FIXME: "FIXME: dotabuff/manta doesn't have these..." (godox)
/*
Check failure on line 465 in pkg/demoinfocs/common/player.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/common/player.go#L465
pkg/demoinfocs/common/player.go:465: Line contains TODO/BUG/FIXME: "TODO Find out where we can find the velo..." (godox)
Raw output
pkg/demoinfocs/common/player.go:465: pkg/demoinfocs/common/player.go:465: Line contains TODO/BUG/FIXME: "TODO Find out where we can find the velo..." (godox)
// TODO Find out where we can find the velocity in Source 2 demos
Check failure on line 572 in pkg/demoinfocs/common/player.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/common/player.go#L572
pkg/demoinfocs/common/player.go:572: Line contains TODO/BUG/FIXME: "TODO change this func return type to uin..." (godox)
Raw output
pkg/demoinfocs/common/player.go:572: pkg/demoinfocs/common/player.go:572: Line contains TODO/BUG/FIXME: "TODO change this func return type to uin..." (godox)
// TODO change this func return type to uint64? (small BC)
Check failure on line 327 in pkg/demoinfocs/common/player_test.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/common/player_test.go#L327
pkg/demoinfocs/common/player_test.go:328: Line contains TODO/BUG/FIXME: "TODO: fix for CS2" (godox)
Raw output
pkg/demoinfocs/common/player_test.go:327: pkg/demoinfocs/common/player_test.go:328: Line contains TODO/BUG/FIXME: "TODO: fix for CS2" (godox)
/*
Check failure on line 100 in pkg/demoinfocs/net_messages.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/net_messages.go#L100
pkg/demoinfocs/net_messages.go:100: Line contains TODO/BUG/FIXME: "FIXME: combine with above" (godox)
Raw output
pkg/demoinfocs/net_messages.go:100: pkg/demoinfocs/net_messages.go:100: Line contains TODO/BUG/FIXME: "FIXME: combine with above" (godox)
// FIXME: combine with above
Check failure on line 347 in pkg/demoinfocs/parsing.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/parsing.go#L347
pkg/demoinfocs/parsing.go:347: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
Raw output
pkg/demoinfocs/parsing.go:347: pkg/demoinfocs/parsing.go:347: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
panic(err) // FIXME: avoid panic
Check failure on line 359 in pkg/demoinfocs/parsing.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/parsing.go#L359
pkg/demoinfocs/parsing.go:359: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
Raw output
pkg/demoinfocs/parsing.go:359: pkg/demoinfocs/parsing.go:359: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
panic(err) // FIXME: avoid panic
Check failure on line 393 in pkg/demoinfocs/parsing.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/parsing.go#L393
pkg/demoinfocs/parsing.go:393: Line contains TODO/BUG/FIXME: "FIXME: refactor to interface instead of ..." (godox)
Raw output
pkg/demoinfocs/parsing.go:393: pkg/demoinfocs/parsing.go:393: Line contains TODO/BUG/FIXME: "FIXME: refactor to interface instead of ..." (godox)
// FIXME: refactor to interface instead of switch
Check failure on line 314 in pkg/demoinfocs/s2_commands.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/s2_commands.go#L314
pkg/demoinfocs/s2_commands.go:314: Line contains TODO/BUG/FIXME: "TODO: taken from dotabuff/manta. do we r..." (godox)
Raw output
pkg/demoinfocs/s2_commands.go:314: pkg/demoinfocs/s2_commands.go:314: Line contains TODO/BUG/FIXME: "TODO: taken from dotabuff/manta. do we r..." (godox)
return ms[i].priority() < ms[j].priority() // TODO: taken from dotabuff/manta. do we really need this?
Check failure on line 348 in pkg/demoinfocs/s2_commands.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/s2_commands.go#L348
pkg/demoinfocs/s2_commands.go:348: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
Raw output
pkg/demoinfocs/s2_commands.go:348: pkg/demoinfocs/s2_commands.go:348: Line contains TODO/BUG/FIXME: "FIXME: avoid panic" (godox)
panic(err) // FIXME: avoid panic
Check failure on line 147 in pkg/demoinfocs/stringtables.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/stringtables.go#L147
pkg/demoinfocs/stringtables.go:147: Line contains TODO/BUG/FIXME: "FIXME: We never got a proper CreateStrin..." (godox)
Raw output
pkg/demoinfocs/stringtables.go:147: pkg/demoinfocs/stringtables.go:147: Line contains TODO/BUG/FIXME: "FIXME: We never got a proper CreateStrin..." (godox)
return // FIXME: We never got a proper CreateStringTable for this table ...
Check failure on line 598 in pkg/demoinfocs/stringtables.go
github-actions / golangci-lint
[golangci-lint] pkg/demoinfocs/stringtables.go#L598
pkg/demoinfocs/stringtables.go:598: Line contains TODO/BUG/FIXME: "TODO: what to do with userInfo.GetSteami..." (godox)
Raw output
pkg/demoinfocs/stringtables.go:598: pkg/demoinfocs/stringtables.go:598: Line contains TODO/BUG/FIXME: "TODO: what to do with userInfo.GetSteami..." (godox)
xuid := userInfo.GetXuid() // TODO: what to do with userInfo.GetSteamid()? (seems to be the same, but maybe not in China?)