saveourtool/diktat

Multiline TODO/FixME

Open

#969 opened on Jul 7, 2021

View on GitHub
 (1 comment) (0 reactions) (1 assignee)Kotlin (40 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (571 stars)
PR merge metrics
 (PR metrics pending)

Description

It could be useful to process multiline comments, marked as TODO or FixME as follows:

// TODO: comment1
// comment2
// comment3

Change to

// TODO: comment1
// TODO: comment2
// TODO: comment3

Details

IDEA have logic for highlighting with blue all lines, only if lines starting from the second have extra spaces at the beginning:

// TODO: comment
//  now it's highlights too

But by default only line with TODO/FixME keyword will be highlighted.

However, it's not good approach to add extra space during the fix, since after when TODO/FixME will be done, there is a big chance, that developer will remove only the first line from TODO/FixME comment, since only it was highlighted. In aim to avoid this, we need to add TODO/FixME on each line

Contributor guide