[racerd] document GuardedBy issue

Summary: As per title

Reviewed By: jvillard

Differential Revision: D22019339

fbshipit-source-id: 0aab4475e
master
Nikos Gorogiannis 5 years ago committed by Facebook GitHub Bot
parent f22d7e2fd0
commit 4bbe5a064b

@ -0,0 +1,16 @@
A field annotated with `@GuardedBy` is being accessed by a call-chain that starts at a non-private method without synchronization.
Example:
```java
class C {
@GuardedBy("this")
String f;
void foo(String s) {
f = s; // unprotected access here
}
}
```
Action: Protect the offending access by acquiring the lock indicated by the `@GuardedBy(...)`.

@ -575,6 +575,7 @@ let _global_variable_initialized_with_function_or_method_call =
let guardedby_violation_racerd =
register_from_string Warning ~id:"GUARDEDBY_VIOLATION" ~hum:"GuardedBy Violation" RacerD
~user_documentation:[%blob "../../documentation/issues/GUARDEDBY_VIOLATION.md"]
let impure_function = register_from_string ~id:"IMPURE_FUNCTION" Error Impurity

Loading…
Cancel
Save