Let danger check for frozen classes
This commit is contained in:
parent
08fff48065
commit
1389262c3f
|
@ -23,6 +23,7 @@ Here are the checks that Danger does so far:
|
||||||
- PR description is not empty
|
- PR description is not empty
|
||||||
- Big PR got a warning to recommend to split
|
- Big PR got a warning to recommend to split
|
||||||
- PR contains a file for towncrier and extension is checked
|
- PR contains a file for towncrier and extension is checked
|
||||||
|
- PR does not modify frozen classes
|
||||||
- PR contains a Sign-Off, with exception for Element employee contributors
|
- PR contains a Sign-Off, with exception for Element employee contributors
|
||||||
- PR with change on layout should include screenshot in the description
|
- PR with change on layout should include screenshot in the description
|
||||||
- PR which adds png file warn about the usage of vector drawables
|
- PR which adds png file warn about the usage of vector drawables
|
||||||
|
|
|
@ -52,6 +52,19 @@ if (requiresChangelog) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check that frozen classes have not been modified
|
||||||
|
const frozenClasses = [
|
||||||
|
"OlmInboundGroupSessionWrapper.kt",
|
||||||
|
"OlmInboundGroupSessionWrapper2.kt",
|
||||||
|
]
|
||||||
|
|
||||||
|
frozenClasses.forEach(frozen => {
|
||||||
|
if (editedFiles.some(file => file.endsWith(frozen))) {
|
||||||
|
fail("Frozen class `" + frozen + "` has been modified. Please do not modify frozen class.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
// Check for a sign-off
|
// Check for a sign-off
|
||||||
const signOff = "Signed-off-by:"
|
const signOff = "Signed-off-by:"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue