mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
chore(inputs): remove allowedLineEnding rule as it is to heavy
This commit is contained in:
3 files changed
-14
No files matched your search
@@ -34,7 +34,6 @@ export enum Input {
|
|||||||
AllowedPaths = "allowed-paths",
|
AllowedPaths = "allowed-paths",
|
||||||
BlockedPaths = "blocked-paths",
|
BlockedPaths = "blocked-paths",
|
||||||
RequireFinalNewline = "require-final-newline",
|
RequireFinalNewline = "require-final-newline",
|
||||||
AllowedLineEnding = "allowed-line-ending",
|
|
||||||
|
|
||||||
// User Health Checks
|
// User Health Checks
|
||||||
MinRepoMergedPrs = "min-repo-merged-prs",
|
MinRepoMergedPrs = "min-repo-merged-prs",
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const VALID_AUTHOR_ASSOCIATIONS = [
|
|||||||
"NONE",
|
"NONE",
|
||||||
"OWNER",
|
"OWNER",
|
||||||
];
|
];
|
||||||
const VALID_LINE_ENDINGS = ["lf", "crlf", "cr"];
|
|
||||||
|
|
||||||
function parseList(raw: string): string[] {
|
function parseList(raw: string): string[] {
|
||||||
return raw
|
return raw
|
||||||
@@ -57,7 +56,6 @@ export function getSettings(): Settings {
|
|||||||
allowedPaths: core.getMultilineInput(Input.AllowedPaths),
|
allowedPaths: core.getMultilineInput(Input.AllowedPaths),
|
||||||
blockedPaths: core.getMultilineInput(Input.BlockedPaths),
|
blockedPaths: core.getMultilineInput(Input.BlockedPaths),
|
||||||
requireFinalNewline: core.getBooleanInput(Input.RequireFinalNewline),
|
requireFinalNewline: core.getBooleanInput(Input.RequireFinalNewline),
|
||||||
allowedLineEnding: core.getInput(Input.AllowedLineEnding),
|
|
||||||
|
|
||||||
// User Health Checks
|
// User Health Checks
|
||||||
minRepoMergedPrs: parseInt(core.getInput(Input.MinRepoMergedPrs)),
|
minRepoMergedPrs: parseInt(core.getInput(Input.MinRepoMergedPrs)),
|
||||||
@@ -146,14 +144,4 @@ function validateSettings(settings: Settings): void {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
settings.allowedLineEnding !== "" &&
|
|
||||||
!VALID_LINE_ENDINGS.includes(settings.allowedLineEnding)
|
|
||||||
) {
|
|
||||||
throw new Error(
|
|
||||||
`"allowed-line-ending" must be one of ${VALID_LINE_ENDINGS.join(", ")} or empty, ` +
|
|
||||||
`got "${settings.allowedLineEnding}"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,6 @@ export interface Settings {
|
|||||||
allowedPaths: string[];
|
allowedPaths: string[];
|
||||||
blockedPaths: string[];
|
blockedPaths: string[];
|
||||||
requireFinalNewline: boolean;
|
requireFinalNewline: boolean;
|
||||||
allowedLineEnding: string;
|
|
||||||
|
|
||||||
// User Health Checks
|
// User Health Checks
|
||||||
minRepoMergedPrs: number;
|
minRepoMergedPrs: number;
|
||||||
|
|||||||
Reference in new issue
Block a user