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.
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:
No idea how difficult that is to implement, just wanted to drop that idea.