Custom rules for Detekt used by Drop Project.
Current rules include:
- ForbiddenKeywords, searches students submissions for forbidden keywords such as 'break'
- GlobalVariables, detect the use of global variables - should be avoided in certain projects
Include the following dependency on your pom file:
<dependency>
<groupId>org.dropproject</groupId>
<artifactId>drop-project-detekt-extensions</artifactId>
<version>0.3.0</version>
</dependency>
Add this configuration to detekt.yml:
drop-project:
active: true
ForbiddenKeywords:
active: true
forbiddenKeywords: 'for,break,split,indexOf,contains'
excludes: "**/Test*.kt"
GlobalVariables:
active: true