You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
common anti-patterns: eg Unvalidated result of ecrecover()
informational: Style Guides, Complex calculation in expression, etc
gas optimization: eg Optimize storage/struct layout
Suggested lint options
--include - run only on specified files
--exclude - exclude specified files
--include-path - run linter on files matching the specified glob pattern.
--exclude-path - run linter on files that do not match the specified glob pattern.
--format: json | markdown - generate report in json or formatted markdown format
--only-severity: high | med | low | info | gas - use only selected severity for output (can be multiple)
--ignore-severity: high | med | low | info | gas - ignore selected severity (can be multiple)
--with-description - usually description is large, should disable it by default to avoid too long console output.
--show-description: detector title - show description of detector
Suggested output style
Informational: Non-specific Imports
Description(optional): This form is not recommended for use, because it unpredictably pollutes the namespace.
If you add new top-level items inside “filename”, they automatically appear in all files that import like this from “filename”.
It is better to import specific symbols explicitly.
--> src/Counter.sol:
|
3 | import "./ICounter.sol";| ^^^^^^^^^^^^^^
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
Forge
Describe the feature you would like
Motivation
Add static analyzer in foundry to make developer's life easier and make code more clean and error-prone.
Description
A static analyzer should be a combination of known issues, common anti-patterns, informational (eg "write better code"), and gas optimization.
ecrecover()
Suggested
lint
options--include
- run only on specified files--exclude
- exclude specified files--include-path
- run linter on files matching the specified glob pattern.--exclude-path
- run linter on files that do not match the specified glob pattern.--format
:json | markdown
- generate report in json or formatted markdown format--only-severity
:high | med | low | info | gas
- use only selected severity for output (can be multiple)--ignore-severity
:high | med | low | info | gas
- ignore selected severity (can be multiple)--with-description
- usually description is large, should disable it by default to avoid too long console output.--show-description
:detector title
- show description of detectorSuggested output style
Additional context
No response
The text was updated successfully, but these errors were encountered: