Get Started
- CodeAnt AI
- Control Center
- Pull Request Review
- IDE
- Compliance
- Anti-Patterns
- Code Governance
- Infrastructure Security Database
- Application Security Database
- Apex
- Bash
- C
- Clojure
- Cpp
- Csharp
- Dockerfile
- Elixir
- Fingerprints
- Generic
- Go
- Aws-lambda
- Gin
- Gorilla
- Gorm
- Grpc
- Jwt-go
- Lang
- Best practice
- Correctness
- Correctness
- Maintainability
- Memory
- Security
- Security
- Net
- Otto
- Secrets
- Template
- Html
- Java
- Javascript
- Json
- Kotlin
- Ocaml
- Php
- Problem-based-packs
- Python
- Ruby
- Rust
- Scala
- Solidity
- Swift
- Terraform
- Typescript
- Yaml
Correctness
$VALUE
is a loop pointer that may be exported from the loop. This pointer is shared between loop iterations, so the exported reference will always point to the last loop value, which is likely unintentional. To fix, copy the pointer to a new pointer within the loop.
path.Join(...)
always joins using a forward slash. This may cause issues on Windows or other systems using a different delimiter. Use filepath.Join(...)
instead which uses OS-specific path separators.
Likelihood: LOW
Confidence: LOW
Detected useless comparison operation $X == $X
or $X != $X
. This will always return ‘True’ or ‘False’ and therefore is not necessary. Instead, remove this comparison operation or use another comparison expression that is not deterministic.
Detected useless if statement. ‘if (True)’ and ‘if (False)’ always result in the same behavior, and therefore is not necessary in the code. Remove the ‘if (False)’ expression completely or just the ‘if (True)’ comparison depending on which expression is in the code.