/
rulesmarketplace.js
141 lines (139 loc) · 4.62 KB
/
rulesmarketplace.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
* ADD YOUR REPOSITORY TO THE DETEKT MARKETPLACE
*
* We're allowing third-party repositories that contains rulesets,
* custom processors, custom reporters and external plugins that work with Detekt.
*
* You can read more about how to extend Detekt here:
* https://detekt.dev/docs/introduction/extensions
*
* Instructions for adding your repository:
*
* - Add your third-party repository in the json array below
* - `title` is the repository name
* - `description` is a short (≤120 characters) description of the repository.
* - `repo` is the repository URL
* - `ruleset` (Optional) is the ID of the ruleset
* - `rules` (Optional) is an array of rules your ruleset is offering
* - `usesTypeResolution` (Optional) a boolean weather or not your ruleset uses type resolution.
* - Open a PR and check for reported CI errors
*/
export const tagTypes = {
ruleset: {
color: "#39ca30",
description: "A collection of custom rules for Detekt",
},
processor: {
color: "#e9669e",
description: "A custom processor for Detekt",
},
reporter: {
color: "#fe6829",
description: "A custom reporter for Detekt",
},
plugin: {
color: "#a44fb7",
description: "A plugin or a tool built on top of Detekt",
},
};
// Add sites to this list
export const extensions = [
{
title: "Compiler",
description:
"A ruleset that wraps the warnings and info messages of the Kotlin compiler as detekt findings..",
repo: "https://github.com/BraisGabin/detekt-compiler-rules",
ruleset: "compiler",
rules: ["CompilerInfo", "CompilerWarning"],
usesTypeResolution: true,
tags: ["ruleset"],
},
{
title: "Compose",
description:
"A set of Detekt rules to help prevent common errors in projects using Jetpack Compose.",
repo: "https://github.com/appKODE/detekt-rules-compose",
ruleset: "compose",
rules: [
"ReusedModifierInstance",
"UnnecessaryEventHandlerParameter",
"ComposableEventParameterNaming",
"ModifierHeightWithText",
"ModifierParameterPosition",
"ModifierDefaultValue",
"MissingModifierDefaultValue",
"PublicComposablePreview",
],
usesTypeResolution: false,
tags: ["ruleset"],
},
{
title: "Doist detekt-rules",
description:
"This repository contains custom detekt rules based on Doist internal coding conventions.",
repo: "https://github.com/Doist/detekt-rules",
ruleset: "DoistRuleSet",
rules: [
"NoBlankNewLineAfterClassHeader",
"ConsistentWhenEntries",
"SingleLineWhenEntryExpressionsAreWrapped",
"MutableObservablePropertyIsPrivate",
"NoNotNullOperator",
"TodoPattern",
],
usesTypeResolution: false,
tags: ["ruleset"],
},
{
title: "Hint",
description:
"A ruleset to implement detection of violation of programming principles. detekt-hint offers also instructions on how to integrate with Danger and Github Actions",
repo: "https://github.com/mkohm/detekt-hint",
tags: ["plugin", "ruleset"],
ruleset: "detekt-hint",
rules: [
"InterfaceSegregationPrinciple",
"LackOfCohesionMethods",
"OpenClosedPrinciple",
"UseCompositionInsteadOfInheritance",
],
usesTypeResolution: true,
},
{
title: "Gitlab Report",
description:
"A reporter to export Detekt findings to GitLab Code Quality (and other code climate compatible tools).\nThis is designed for use with GitLab, but should also work fine with everything else that accepts the code climate format.",
repo: "https://gitlab.com/cromefire/detekt-gitlab-report",
tags: ["reporter"],
},
{
title: "Operator",
description:
"Rules to prefer expressions over named functions for kotlin operators.",
repo: "https://github.com/colematthew4/detekt-operator",
ruleset: "detekt-operator",
rules: [
"PreferInOverContainsSyntax",
"PreferUnaryPrefixOverFunctionSyntax",
"PreferUnaryPostfixOverFunctionSyntax",
"PreferArithmeticSymbolSyntax",
"PreferBracketAccessorOverFunctionSyntax",
],
usesTypeResolution: false,
tags: ["ruleset"],
},
{
title: "Verify Implementation",
description:
"A ruleset which enables verifying whether concrete classes are implemented as specified according to annotations applied to base types.",
repo: "https://github.com/cph-cachet/detekt-verify-implementation",
ruleset: "verify-implementation",
rules: ["Immutable", "DataClass"],
usesTypeResolution: true,
tags: ["ruleset"],
},
/*
Pro Tip: add your ruleset in alphabetical order.
Appending your ruleset here (at the end) is more likely to produce Git conflicts.
*/
];