https://kotlinlang.org logo
#detekt
Title
# detekt
a

Ankur Gupta

06/19/2021, 11:54 AM
Hi, I'm trying out detekt first time. I want to add additional functionality to it. I want to be able to detect authorship comments at top of file. There is rule for comments
ForbiddenComment
but I'm not sure how to customize it to check for the specific type of comments. Or do I need to make a new rule altogether, Please point me to the relevant path. Thanks! Example comment I'm talking about:-
Copy code
/**
 * Created by Dev Name on 28/05/21.
 */
Example 2-
Copy code
/*
 * @Author: Dev name
 * Email: <mailto:devname@company.com|devname@company.com>
 */
Edit: So I figured it out. Needed to add custom configuration *.yml file with values
created
and
author
to add check. Also needed to set
buildUponDefaultConfig = true
g

gammax

06/21/2021, 10:37 AM
Great so you solved right?
a

Ankur Gupta

06/21/2021, 10:37 AM
Yes
5 Views