Skip to content

Commit

Permalink
internal/lsp/hover: "fix" codeql finding (#1156)
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Renatus <[email protected]>
  • Loading branch information
srenatus authored Oct 1, 2024
1 parent 036a6b6 commit 06db4bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/lsp/hover/hover.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ func UpdateKeywordLocations(ctx context.Context, cache *cache.Cache, uri string)
keywordLocations := make(map[uint][]types2.KeywordLocation)

for line, uses := range keywords {
lineNumber64, err := strconv.ParseUint(line, 10, 64)
lineNumber32, err := strconv.ParseUint(line, 10, 32)
if err != nil {
return fmt.Errorf("failed to parse line number: %w", err)
}

lineNumber := uint(lineNumber64)
lineNumber := uint(lineNumber32)

for _, use := range uses {
keywordLocations[lineNumber] = append(keywordLocations[lineNumber], types2.KeywordLocation{
Expand Down

0 comments on commit 06db4bb

Please sign in to comment.