Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • PantyNabber/fc-pregmod
  • pregmodfan/fc-pregmod
  • Alice.Grant/fc-pregmod
  • powerfful/fc-pregmod
  • elstumpo/fc-pregmod
  • Y/fc-pregmod
  • floer/fc-pregmod
  • oidocrop/fc-pregmod
  • hawk5005/fc-pregmod
  • nn/fc-pregmod
  • latios298/fc-pregmod
  • brpregmodfan/fc-pregmod
  • SomeoneTookMyUserName/fc-pregmod
  • 000-250-006/fc-pregmod
  • rewrica/fc-pregmod
  • Stuffedgame/fc-pregmod
  • wisepants314/fc-pregmod
  • fcanon/fc-pregmod
  • randomanon1/pregmod-mod-cyberfurry
  • teddy.buckland/fc-pregmod
  • farsinian_591b7a2d8b49d/fc-pregmod
  • FCShotadev/fc-pregmod
  • uselessartifact/fc-pregmod
  • irina_90/fc-pregmod
  • thaumx/fc-pregmod
  • MouseOfLight/fc-pregmod
  • empresssela/fc-pregmod
  • MasterAaran/fc-pregmod
  • ishy/fc-pregmod
  • psychofox/fc-pregmod
  • shadomancer/fc-pregmod
  • tycrakgg/fc-pregmod
  • azktaawc/fc-pregmod
  • andonno07/fc-pregmod
  • Onithyr/fc-pregmod
  • redneck987.jl/fc-pregmod
  • Farseeker/fc-pregmod
  • milliarc/fc-pregmod
  • BeefimusMaximus/fc-pregmod
  • magicknight79/fc-pregmod
  • hexall90/fc-pregmod
  • cantworkforever/fc-pregmod
  • jc052005/fc-pregmod
  • klorpa/fc-pregmod
  • doku/fc-pregmod
  • samhradh/fc-pregmod
  • scientist/fc-pregmod
  • albania420/fc-pregmod
  • Editoranon/fc-pregmod
  • Anony/fc-pregmod
  • deimios666/fc-pregmod
  • IvoHoe/fc-pregmod
  • bitty/fc-pregmod
  • RealAnon1800/fc-pregmod
  • brankirk/fc-pregmod
  • Amygdalan/fc-pregmod
  • DankWolf/fc-pregmod
  • Supot1951/fc-pregmod
  • bcy603/fc-pregmod
  • pwfxjpuv/fc-pregmod
  • ThreadAnon/fc-pregmod
  • Anon1800/fc-pregmod
  • Echoart/fc-pregmod
  • Dingotush/fc-pregmod
  • anonman/fc-pregmod
  • Arkerthan/fc-pregmod
  • svornost/fc-pregmod
  • wierdwierdos/fc-pregmod
  • wetwareAnon/fc-pregmod
  • QuartzHat/fc-pregmod
  • IchthysdeKilt/fc-pregmod
  • AnonAnonFC/fc-pregmod
  • Alexsis/fc-pregmod
  • LoyalTreeWP/fc-pregmod
  • aerialace/fc-pregmod
  • NurseryAnon/fc-pregmod
  • drakeashordcataclysm/fc-pregmod
  • AshVaris/fc-pregmod
  • purely0nothing/fc-pregmod
  • alex2011/fc-pregmod
  • Lindontree/fc-pregmod
  • FCaa/fc-pregmod
  • TR-8R/fc-pregmod
  • Jones/fc-pregmod
  • brr99/fc-pregmod
  • WriteAnon101/fc-pregmod
  • Drosil/fc-pregmod
  • Bob1221/fc-pregmod
  • vas/fc-pregmod
  • gitgud.user.937/fc-pregmod
  • D-K/fc-pregmod
  • AnonDev/fc-pregmod
  • madman23456/fc-pregmod
  • InarusLynx/fc-pregmod
  • Sonofrevvan/fc-pregmod
  • Randoisrando/fc-pregmod
  • cheez94/fc-pregmod
  • dldldl/fc-pregmod
  • alice321/fc-pregmod
  • Alexei91/fc-pregmod
  • darkcy/fc-pregmod
  • MapleMAD/fc-pregmod
  • pillarofsalt/fc-pregmod
  • vultureangels/fc-pregmod
  • kernel/fc-pregmod
  • nooneman/fc-pregmod
  • deepmurk/fc-pregmod
  • uglybead/fc-pregmod
  • lemongrab/fc-pregmod
  • temperence-chan/fc-pregmod
  • hcommenter/fc-pregmod
  • SpedeMemerson/fc-pregmod
  • qwijqwsf/fc-pregmod
  • BuDClow/fc-pregmod
  • HiveBro/fc-pregmod
  • shoku/fc-pregmod
  • ezsh/fc-pregmod
  • Blank/fc-pregmod
  • randoralcissian/fc-pregmod
  • benito92/fc-pregmod
  • balakart/fc-pregmod
  • wedonotsaw/fc-pregmod
  • Cayleth/fc-pregmod
  • Khip/fc-pregmod
  • Zfair/fc-pregmod
  • promethium/fc-pregmod
  • scyne/fc-pregmod
  • ZZC/fc-pregmod
  • SilverJanine/fc-pregmod
  • joxosix654email-9.co/fc-pregmod
  • Littlefootlittleguy/fc-pregmod
  • FelipeBA/fc-pregmod
  • bigtiddygothbf/fc-pregmod
  • Qotsafan/fc-pregmod
  • Zachpocalypse/fc-pregmod
  • milkanon66/fc-pregmod
  • GreGGoZZ/fc-pregmod
  • drsnarf86/fc-pregmod
  • valen102938/fc-pregmod
  • pregspammer/fc-pregmod
  • ponderin94/fc-pregmod
  • nook/fc-pregmod
  • carnifex34/fc-pregmod-mod-carni
  • SyntheticHigh/fc-pregmod
  • bob112211/fc-pregmod
  • amomynous0/fc-pregmod
  • oxone/fc-pregmod
  • MaxEuwe/fc-pregmod
  • nekoanon/fc-pregmod
  • preglocke/fc-pregmod
  • valen10293847/fc-pregmod
  • 2hu4u/fc-pregmod
  • mayibrad/fc-pregmod
  • Screm/fc-pregmod
  • Ansopedi/fc-pregmod
  • mrchaosbones/fc-pregmod
  • putrid/fc-pregmod
  • Kinnerman/fc-pregmod
  • gungrave1155/fc-pregmod
  • prndev/fc-pregmod
  • weresmilodon/fc-pregmod
  • auxxigobin/fc-pregmod
  • alice-chan/fc-pregmod
  • wigglie/fc-pregmod
  • jrliltfgb/fc-pregmod
  • Lord.alek.shade/fc-pregmod
  • truetailthesquire/fc-pregmod
  • lowercasedonkey/fc-pregmod
  • alice-chan9/fc-pregmod
  • eroglyphics/fc-pregmod
  • taliyent/fc-pregmod
  • zenzombie90/fc-pregmod
  • kjarik/fc-pregmod
  • wriggler/fc-pregmod
  • midnightblue/fc-pregmod
  • faraen/fc-pregmod
  • sigurd.cole/fc-pregmod
  • FCbuganon/fc-pregmod
  • kidkinster/fc-pregmod
  • Kar_Dragon/fc-pregmod
  • Zhafier/fc-pregmod
  • crcaretti/fc-pregmod
  • anond/fc-pregmod
  • tempmania/fc-pregmod
  • Dhanze/fc-pregmod
  • EstaUnCachucha/fc-pregmod
  • oniAnon/fc-pregmod
  • plebian/fc-pregmod
  • maxd569/fc-pregmod
  • Levarn/fc-pregmod
  • pumpkinspice/fc-pregmod
  • GammaXai/fc-pregmod
  • DanBackslide/fc-pregmod
  • i107760/fc-pregmod
  • Absimiliard/fc-pregmod
  • AmbrosiaCheesecake/fc-pregmod
  • fuguer/fc-pregmod
  • Azurel/fc-pregmod
  • Fake_Dev/fc-pregmod
  • ddongsanda/fc-pregmod
  • Combine456/fc-pregmod
  • UnwrappedGodiva/fc-pregmod
  • toyRuberDucky/fc-pregmod
  • zmobie/fc-pregmod
  • chuongk/fc-pregmod
  • BigWalnuts/fc-pregmod
  • Birdstrike/fc-pregmod
  • r3d/fc-pregmod
  • mawspa/fc-pregmod
  • sushila/fc-pregmod
  • DeathShip/fc-pregmod
  • eggrollsandwich/fc-pregmod
  • krayken/fc-pregmod
  • Reman/fc-pregmod
  • dwiafgts/fc-pregmod
  • jort93/fc-pregmod
  • teruterubouzu/fc-pregmod
  • flut/fc-pregmod
  • john-normal/fc-pregmod
  • Jonathan2405/fc-pregmod
  • Tyrgalon/fc-pregmod
  • NovX/fc-pregmod
  • Star1/fc-pregmod
  • Transhumanist01/fc-pregmod
  • m1017242/fc-pregmod
  • Rizal98798/fc-pregmod
  • jamezu369/fc-pregmod
  • thisisawittyname/fc-pregmod
  • KnightBoulegard/fc-pregmod
  • jblack/fc-pregmod
  • Souldrainr/fc-pregmod
  • torbjornhub/fc-pregmod
  • turnop/fc-pregmod
  • breadedpigeon/fc-pregmod
  • fire.maker/fc-pregmod
  • Inahaze/fc-pregmod
  • Waerjak/fc-pregmod
  • Trashman1138/fc-pregmod
  • supanintendo/fc-pregmod
  • _no0neman/fc-pregmod
  • Weslo/fc-pregmod
  • qw89/fc-pregmod
  • EvilDruid/fc-pregmod
  • dt25/fc-pregmod
  • Raou/fc-pregmod
  • DDouFu/fc-pregmod
  • Mauno/fc-pregmod
  • PandemoniumPenguin/fc-pregmod
  • AngelPuppet/fc-pregmod
  • DasUser79/fc-pregmod
  • Keaeag3s/fc-pregmod
  • HazeHazeHaze/fc-pregmod
  • hpotato/fc-pregmod
  • owouchthatbloodyhurt/fc-pregmod
  • v7Silent/fc-pregmod
  • nickylass/fc-pregmod
  • ThePrimer/fc-pregmod
  • PineCone/fc-pregmod
  • bruhmomentum17/fc-pregmod
  • CheatDude/fc-pregmod
  • synnove/fc-pregmod
  • en_bees/fc-pregmod
  • seronis/fc-pregmod
  • Nepidinepnep/fc-pregmod
  • Titanninja/fc-pregmod
  • Elohiem/fc-pregmod
  • cocoajazz/fc-pregmod
  • tfwncagf/fc-pregmod
  • ChunkyMonke/fc-pregmod
  • Dracoman671/fc-pregmod
  • jgl/fc-pregmod
  • Inev/fc-pregmod
  • jbige/fc-pregmod
  • MonsterMate/fc-pregmod
  • Konstantin6961/fc-pregmod
  • darth_ashi/fc-pregmod
  • shinx/fc-pregmod
  • Anu/fc-pregmod
  • Greytide/fc-pregmod
  • Bonafidemetal/fc-pregmod
  • Peje/fc-pregmod
  • Hexfy98/fc-pregmod
  • TooSlow/fc-pregmod
  • SoGu/fc-pregmod
  • CloudyCoffee/fc-pregmod
  • Welptard/fc-pregmod
  • Ploc/fc-pregmod-ploc
  • rain-/fc-pregmod
  • Pecanus/fc-pregmod
  • Jhortrax/fc-pregmod
  • valleytwo/fc-pregmod
  • QCmd/fc-pregmod
  • kung-wada/fc-pregmod
  • LolGaye/fc-pregmod
  • Exspiravit1/fc-pregmod
  • jadeddog/fc-pregmod
  • buster-scruggs/fs-antebellum-revivalism
  • policia123/fc-pregmod
  • evrgentesee/fc-pregmod
  • rko127/fc-pregmod
  • ExcalGrip12/fc-pregmod
  • BlackAion/fc-pregmod
  • Boss2020/fc-pregmod
  • Lawled/fc-pregmod
  • shiro/fc-pregmod
  • Skavenkeri/fc-pregmod
  • PooPooDooDooHead/fc-pregmod
  • Dugee/fc-pregmod
  • Portal124/fc-pregmod-vore
  • Fekenol/fc-pregmod
  • elGuapo/fc-pregmod
  • KelioSteel/fc-pregmod
  • sldlddk/fc-pregmod
  • lumepanter/fc-pregmod
  • ryuhana/fc-pregmod
  • Nene1009yb/fc-pregmod
  • DontAskDontTell/fc-pregmod-extra-events
  • Dulgi/fc-pregmod
  • Jate/fc-pregmod
  • percy365/fc-pregmod
  • franklygeorge/fc-pregmod
  • Dragneel117/fc-pregmod
  • vl96/fc-pregmod
  • Gorlom/fc-economicmod
  • NotAlive/fc-pregmod
  • Heretek/fc-pregmod
  • joeshmo828282/fc-pregmod
  • deswes/fc-pregmod
  • Nanana21/fc-pregmod
  • Gbr6/fc-pregmod
  • RandomNecro/fc-pregmod
  • Trinidad/fc-pregmod
  • anonymousey/fc-pregmod
  • macaronideath/fc-pregmod
  • fcbleh/fc-pregmod
  • jk3000/fc-pregmod
  • Akane/fc-pregmod
  • TheBoi/fc-pregmod
  • Sheenariel/fc-pregmod
  • Metapod/multi-custom
  • Banyanael/fc-pregmod
  • frogge/fc-pregmod
  • idkkk12385/fc-pregmod
  • Mirarara/fc-pregmod
  • DeaDa/fc-pregmod-thedeal
  • CobraCommander/fc-pregmod
  • bicobus/fc-pregmod
  • CardcaptorRLH85/fc-pregmod
  • temp-ui-start/fc-pregmod
  • PresidentConvert/fc-pregmod
  • delizious/fc-pregmod
  • Ducati/fc-pregmod
  • DerangedLoner/fc-pregmod-development-fork
  • ProjectVictory/fc-pregmod
  • forecastle/fc-pregmod
  • Apathy/fc-pregmod
  • indf/fc-pregmod-dev
  • GavAndAlt/fc-pregmod
  • hagamablabla/fc-pregmod
  • Alaco/fc-pregmod
  • DCoded/fc-pregmod
  • LittlePlague/fc-pregmod
  • MissOnahole/fc-pregmod
  • ishy2317/fc-pregmod
  • nielkazama/fc-pregmod
  • Phobos/fc-pregmod
  • kraster/fc-pregmod
  • JasWS/fc-pregmod
  • FelixJS/fc-pregmod
  • NCherfaoui/fc-pregmod
  • MidnightMoose/fc-pregmod
  • jjjjjj/fc-pregmod
  • Cl0ver/fc-pregmod
  • Pythoniqus/fc-pregmod
  • JohnMolotov/fc-pregmod
  • anonymouspregmodder/fc-pregmod-anonymouspregmodder
  • Fanatey/fc-pregmod
  • Mizako/fc-pregmod
  • Nithhogg/fc-pregmod
  • Bluecoffee/fc-pregmod
  • Liberator/pregmod-ai-clothing
381 results
Select Git revision
Show changes
#!/bin/bash
#
# An hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# We do a simple check to make sure node exists
if command -v node &> /dev/null; then
# Very rudimentary way to check if we have the node packages we need
# This could potentially fail since we don't actually check what packages are installed
if [ -d "node_modules" ]; then
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
node "$DIR/pre-commit.js"
else
echo "Pre-commit hook cannot run because the Node modules have not been installed."
fi
else
echo "Pre-commit hook cannot run because Node is not installed"
fi
/**
* @file An hook script to verify what is about to be committed.
*Called by "git commit" with no arguments. The hook should
* exit with non-zero status after issuing an appropriate message if
* it wants to stop the commit.
*/
// @ts-ignore
import jetpack from "fs-jetpack";
import {execSync} from 'child_process';
// make sure settings.json exists and has all the required properties
execSync("node devTools/scripts/setup.js --settings");
// load settings.json
/** @type {import("./../setup.js").Settings} */
const settings = jetpack.read("settings.json", "json");
if (settings.precommitHookEnabled === 1) {
try {
execSync("node devTools/scripts/sanityCheck.js --staged", {stdio: "inherit"});
} catch (e) {
console.log("Sanity checks failed! See above for details");
process.exit(1);
}
} else if (settings.precommitHookEnabled === -1) {
console.log("Precommit hook temporarily disabled");
settings.precommitHookEnabled = 1;
// save settings to settings.json
jetpack.write("settings.json", settings, {atomic: true});
} else {
console.log("pre-commit sanity checks are currently disabled");
}
// @ts-ignore
import jetpack from 'fs-jetpack';
import {ESLint} from "eslint";
import yargs from "yargs";
import {hideBin} from "yargs/helpers";
import {execSync} from 'child_process';
import stripAnsi from "strip-ansi";
// @ts-ignore
import c from "ansi-colors";
import customChecks from "./customChecks.js";
import spellingChecks from "./spellingChecks.js";
import eslintChecks from "./eslintChecks.js";
import typescriptChecks from "./typescriptChecks.js";
import parser from './detectChanges.js';
// TODO:@franklygeorge flags to selectively run parts of the sanity check. After you add those change the commands in package.json to use them
const args = yargs(hideBin(process.argv))
.showHelpOnFail(true)
.option('staged', {
type: 'boolean',
description: 'Only check staged files',
default: false,
})
.option('interaction', {
type: 'boolean',
description: 'Used by scripts to let the sanity checker know that user interaction is not possible.',
default: true,
})
.parse();
// make sure settings.json exists and has all the required properties
execSync("node devTools/scripts/setup.js --settings");
// load settings.json
/** @type {import("./setup.js").Settings} */
const settings = jetpack.read("settings.json", "json");
// move old log to sanityCheck.log.bak
if (jetpack.exists("sanityCheck.log") === "file") {
jetpack.move("sanityCheck.log", "sanityCheck.log.bak", {overwrite: true});
}
// write new log starting with the current date and time
jetpack.write("sanityCheck.log", new Date().toLocaleString() + "\n\n", {atomic: true});
/**
* Adds a message to the log file, also prints the message to the console by default
* @param {string} message message to log
* @param {boolean} [print] if true (default) then print message to console
*/
function log(message, print = true) {
if (print === true) {
console.log(message);
}
// if message doesn't end with `\n` then add it
if (message.trimEnd() === message) {
message += "\n";
}
// strip color codes and save to log file
jetpack.append("sanityCheck.log", stripAnsi(message));
}
const eslint = new ESLint({
cache: true,
cacheStrategy: "content"
});
/** @type {Array<string>} */
let customProblems = [];
/** @type {Array<string>} */
let spellingProblems = [];
/** @type {Array<object>} */
let eslintProblems = [];
let eslintProblemCount = 0;
/** @type {Array<string>} */
let typescriptProblems = [];
let stagedFiles = undefined;
// add state of staged flag to log
log(`args.staged: ${args.staged}`, false);
if (args.staged === true) {
// get staged files
stagedFiles = parser.stagedFiles();
if (stagedFiles === null) {
stagedFiles = undefined;
}
}
if (stagedFiles !== undefined) {
// if no files in stagedFiles
if (stagedFiles.length === 0) {
log("No staged files found for processing!");
process.exit(2);
}
// add list of staged files to log
log(`staged files: ${JSON.stringify(stagedFiles, undefined, "\t")}`, false);
}
if (settings.checksEnableCustom === true) {
customProblems = customChecks(settings.checksOnlyChangedCustom, stagedFiles, parser);
}
if (settings.checksEnableSpelling === true) {
spellingProblems = spellingChecks(settings.checksOnlyChangedSpelling, stagedFiles, parser);
}
if (settings.checksEnableESLint === true) {
// @ts-ignore
eslintProblems = await eslintChecks(settings.checksOnlyChangedESLint, stagedFiles, parser);
eslintProblems.forEach(problem => {
eslintProblemCount += problem.messages.length;
});
}
if (settings.checksEnableTypescript === true) {
// @ts-ignore
typescriptProblems = typescriptChecks(settings.checksOnlyChangedTypescript, stagedFiles, parser);
}
if (customProblems.length > 0) {
log("=".repeat(20) + "Custom problems" + "=".repeat(20));
log("");
log(customProblems.join("\n"));
}
if (spellingProblems.length > 0) {
log("=".repeat(20) + "Spelling problems" + "=".repeat(20));
log("");
log(spellingProblems.join("\n"));
}
if (eslintProblems.length > 0) {
log("=".repeat(20) + "JavaScript linting problems" + "=".repeat(20));
log("");
// @ts-ignore
const formatter = await eslint.loadFormatter("stylish");
// @ts-ignore
const reportText = await formatter.format(eslintProblems);
log(reportText);
}
if (typescriptProblems.length > 0) {
log("=".repeat(20) + "JavaScript type problems" + "=".repeat(20));
log("");
log(typescriptProblems.join("\n"));
}
log("=".repeat(60));
let skippedChecks = 0;
if (customProblems.length > 0) {
log(c.bold.red(`Custom sanity checks found ${customProblems.length} issues.`));
} else if (settings.checksEnableCustom === true) {
log(c.green("Custom sanity checks found no issues."));
} else {
log(c.yellow("Custom sanity checks are currently disabled."));
skippedChecks += 1;
}
if (spellingProblems.length > 0) {
log(c.bold.red(`cSpell found ${spellingProblems.length} spelling issues.`));
} else if (settings.checksEnableSpelling === true) {
log(c.green("cSpell found no spelling issues."));
} else {
log(c.yellow("Spelling checks using cSpell are currently disabled."));
skippedChecks += 1;
}
if (eslintProblemCount > 0) {
log(c.bold.red(`ESLint found ${eslintProblemCount} linting issues.`));
} else if (settings.checksEnableESLint === true) {
log(c.green(`ESLint found no linting issues.`));
} else {
log(c.yellow("Linting using ESLint is currently disabled."));
skippedChecks += 1;
}
if (typescriptProblems.length > 0) {
log(c.bold.red(`The TypeScript compiler found ${typescriptProblems.length} type issues.`));
} else if (settings.checksEnableTypescript === true) {
log(c.green(`The Typescript compiler found no type issues.`));
} else {
log(c.yellow("Type checking using the Typescript compiler is currently disabled."));
skippedChecks += 1;
}
const issueCount = customProblems.length + spellingProblems.length + eslintProblemCount + typescriptProblems.length;
log("");
let finalMessage = "";
if (issueCount > 0) {
finalMessage = c.bold.red(`${issueCount}`) + " issues found.";
} else {
finalMessage = c.green("No issues found.");
}
if (skippedChecks > 0) {
finalMessage += ` ${c.yellow(skippedChecks)} sanity checker${(skippedChecks > 1) ? "s" : ""} disabled.`;
} else {
finalMessage += c.green(" No sanity checkers disabled.");
}
log(finalMessage);
log("=".repeat(60));
// exclude eslint and typescript problems from making git pre-commit hook fail
// we may change this in the future
if ((issueCount - (eslintProblemCount + typescriptProblems.length)) > 0) {
if (args.staged === true) {
log(`You can temporarily disable the pre-commit hook by changing 'Edit Sanity Check Settings' -> 'Running sanity checks before commiting' in "setup.${process.platform === "win32" ? "bat": "sh"}" to 'Sanity checks are temporarily disabled...'`);
}
process.exit(1);
}