Skip to content

Commit

Permalink
qlty fmt --all (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
qlty-cli-releases[bot] authored Jan 10, 2025
1 parent 9ba3895 commit ffe0a8d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions qlty-plugins/plugins/tests/runLinterTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Target = {
export const getVersionsForTarget = (
dirname: string,
linterName: string,
prefix: string
prefix: string,
) => {
let matchExists = false;
const snapshotsDir = path.resolve(dirname, FIXTURES_DIR, SNAPSHOTS_DIR);
Expand Down Expand Up @@ -59,7 +59,7 @@ export const getVersionsForTarget = (
"Running test for ",
linterName,
" with known good version: ",
knownGoodVersion
knownGoodVersion,
);

return [knownGoodVersion];
Expand All @@ -69,7 +69,7 @@ export const getVersionsForTarget = (
// Check if no snapshots exist yet. If this is the case, run with KnownGoodVersion and Latest, and print advisory text.
if (!matchExists && !OPTIONS.linterVersion) {
console.log(
`No snapshots detected for ${linterName} ${prefix} test. Running test against KnownGoodVersion. See tests/readme.md for more information.`
`No snapshots detected for ${linterName} ${prefix} test. Running test against KnownGoodVersion. See tests/readme.md for more information.`,
);
return [getKnownGoodVersion(dirname, linterName)];
}
Expand All @@ -81,7 +81,7 @@ export const getVersionsForTarget = (
export const getKnownGoodVersion = (dirname: string, linterName: string) => {
const plugin_file = fs.readFileSync(
path.resolve(dirname, "plugin.toml"),
"utf8"
"utf8",
);

const plugin_toml = toml.parse(plugin_file);
Expand Down Expand Up @@ -109,7 +109,7 @@ const detectTargets = (linterName: string, dirname: string): Target[] => {
const linterVersions = getVersionsForTarget(
dirname,
linterName,
prefix
prefix,
);
accumulator.set(prefix, { prefix, input, linterVersions });
}
Expand All @@ -124,7 +124,7 @@ const detectTargets = (linterName: string, dirname: string): Target[] => {
export const runLinterTest = (
linterName: string,
dirname: string,
assertFunction: (testRunResult: any, snapshotPath: string) => void
assertFunction: (testRunResult: any, snapshotPath: string) => void,
) => {
const targets = detectTargets(linterName, dirname);

Expand Down Expand Up @@ -158,7 +158,7 @@ export const runLinterTest = (
Debug(`${namespace}:stderr`)(testRunResult.runResult.stderr);

const files = await FastGlob(
`${driver.sandboxPath}/.qlty/out/*.yaml`.replaceAll("\\", "/")
`${driver.sandboxPath}/.qlty/out/*.yaml`.replaceAll("\\", "/"),
);
for (const file of files) {
const invocationId = path
Expand Down

0 comments on commit ffe0a8d

Please sign in to comment.