
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
github.com/upamune/goimmutablelint
goimmutablelint
is a static analysis tool for Go that helps enforce immutability in function parameters. It detects and reports instances where function parameters are modified, which can lead to unexpected behavior and make code harder to reason about.
To install goimmutablelint
, use the following command:
go get -u github.com/upamune/goimmutablelint
Run goimmutablelint
on your Go packages:
goimmutablelint [flags] <package patterns...>
-v
: Enable verbose output-j <n>
: Set the number of concurrent workers (default is the number of CPUs)-w
: Enable whitelist mode (only check functions with goimmutablelint:check
comment)-h
: Show help messageCheck all packages in the current directory and subdirectories:
goimmutablelint ./...
Check specific packages with verbose output:
goimmutablelint -v github.com/upamune/project/pkg1 github.com/upamune/project/pkg2
Use whitelist mode with 4 workers:
goimmutablelint -w -j 4 ./...
In whitelist mode, only functions with the goimmutablelint:check
comment will be checked. To mark a function for checking in whitelist mode, add the following comment above the function:
// goimmutablelint:check
func myFunction(param *int) {
// This function will be checked in whitelist mode
}
goimmutablelint
outputs results in JSON format. Each issue includes the following information:
Contributions to goimmutablelint
are welcome! Please follow these steps:
Please make sure to update tests as appropriate and adhere to the existing coding style.
If you have any questions or feedback, please open an issue on the GitHub repository.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.