# Code Critique

What we need next is a Code Critique rule. This for once warns developers 
early, but in addition it will
make it much easier to fix the 6 problem cases that the release test exposed.

Checking for current senders of #definedVariables leads us to 
ReVariableAssignedLiteralRule, we can use this as a template.
The main method doing the check looks like this:

```Smalltalk
check: aClass forCritiquesDo: aCriticBlock

        aClass definedVariables do: [ :variable | 
                variable isShadowing  ifTrue: [ 
                        aCriticBlock cull: (self critiqueFor: aClass about: 
variable name) ] ]
```

The full PR is here: https://github.com/pharo-project/pharo/pull/8940 
<https://github.com/pharo-project/pharo/pull/8940>


Reply via email to