Default access mode on getter/setter should not be specified
getters and setters should not specify the access mode if it is the same as the property.
Following code would violate this rule
define public property ProfilerCoverage as logical no-undo initial yes
public get.
public set.
define public property ProfilerBusy as logical no-undo initial yes
public get.
private set.
The correction would be
define public property ProfilerCoverage as logical no-undo initial yes
get.
set.
define public property ProfilerBusy as logical no-undo initial yes
get.
private set.
Our coding style is the opposite. An option to force access mode would be nice.
@movedoa this is the opposite of my request. I think it would be confusing if this was enforced by the same rule, even though the code behind the rules would probably be very similar. The documentation of the rule would be confusing if it was advocating two opposite styles at the same time.
i think with the right name this could be one rule without causing confusion.
PreferedAccessModeStyle with the setting "Implicit/Explicit" for example.
But if i get my own rule i don't care too much how it gets implemented ;-)