-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Labels
Cmd-forge-lintCommand: forge lintCommand: forge lintT-featureType: featureType: featurefirst issueA good way to start contributingA good way to start contributing
Description
Component
Forge
Describe the feature you would like
Add a lint that enforces explicit field naming when initializing structs, improving code readability and maintainability by requiring named parameters instead of positional arguments.
struct Person {
string name;
uint256 age;
address wallet;
}
function namedArgs() public {
Person memory person = Person({
name: "Alice",
age: 25,
wallet: 0x123...
});
}
function positionalArgs() public {
Person memory person = Person("Alice", 25, 0x123...);
}
Additional context
No response
Metadata
Metadata
Assignees
Labels
Cmd-forge-lintCommand: forge lintCommand: forge lintT-featureType: featureType: featurefirst issueA good way to start contributingA good way to start contributing
Type
Projects
Status
Done