pharo icon indicating copy to clipboard operation
pharo copied to clipboard

New rule for empty period

Open Ducasse opened this issue 1 year ago • 1 comments

I saw some code like this: with the period after the first comment and it would be nice to have a rule spotting them.

phaserRate: anInteger
	"change phaserRate for the sound ".
	self dirtMessage add: 'phaserrate'; add: anInteger

Ducasse avatar Apr 24 '24 18:04 Ducasse

The "unnecessary characters found in method body" setting is unfortunately still off by default.

Screenshot from 2024-05-15 10 26 27

But we could extend the ReMethodSourceCleaner (which is already caring on a final dot and unnecessary whitespaces) to also care about an unnecessary dot behind a comment. The ReMethodSourceCleaner utility class is already used in ReCompactSourceCodeCritic / ReCompactSourceCodeRule

astares avatar May 15 '24 08:05 astares