Skip to content

Lint for missing storage write-back #26

@ggwpez

Description

@ggwpez

Often a storage value is first loaded, modify it and then hopefully written back to storage. A lint could be added which checks that modified values from storage are written back. Example:

let mut val = Value::<T>::get();
val += 123;Value::<T>::set(&val); // Errors if this line is missing.

No idea how difficult that is to implement, just wanted to drop that idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions