Skip to content

Commit

Permalink
fix gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Oct 10, 2024
1 parent 9deb9a8 commit b031a80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/lsp/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func HCLRangeToLSP(rng hcl.Range) lsp.Range {

func HCLPosToLSP(pos hcl.Pos) lsp.Position {
return lsp.Position{
// #nosec G105
// #nosec G115
Line: uint32(pos.Line - 1),
// #nosec G105
// #nosec G115
Character: uint32(pos.Column - 1),
}
}
10 changes: 5 additions & 5 deletions internal/lsp/token_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ func (te *TokenEncoder) encodeTokenOfIndex(i int) []uint32 {
deltaStartChar := token.Range.Start.Column - 1 - previousStartChar

data = append(data, []uint32{
// #nosec G105
// #nosec G115
uint32(deltaLine),
// #nosec G105
// #nosec G115
uint32(deltaStartChar),
// #nosec G105
// #nosec G115
uint32(tokenLength),
// #nosec G105
// #nosec G115
uint32(tokenTypeIdx),
// #nosec G105
// #nosec G115
uint32(modifierBitMask),
}...)
} else {
Expand Down

0 comments on commit b031a80

Please sign in to comment.