snowtrack / snowfs

Found unused variables in TypeScript code JS-0356
Performance
Major
2 years ago3 years old
'moveTo' is assigned a value but never used
 992        } else if (target instanceof Commit) {
 993          moveTo = target.hash;
 994        } else {
 995          moveTo = target; 996        }
 997        return this.repoLog.writeLog(`checkout: move from '${oldHeadHash}' to ${targetCommit.hash} with ${reset}`);
 998      });
'detectionMode' is assigned a value but never used
 820    } else if (reset & RESET.DETECTIONMODE_SIZE_AND_HASH_FOR_ALL_FILES) {
 821      detectionMode = DETECTIONMODE.SIZE_AND_HASH_FOR_ALL_FILES;
 822    } else if (reset & RESET.DETECTIONMODE_SIZE_AND_HASH_FOR_SMALL_FILES) {
 823      detectionMode = DETECTIONMODE.SIZE_AND_HASH_FOR_SMALL_FILES; 824    }
 825
 826    const oldFilesMap: Map<string, TreeEntry> = targetCommit.root.getAllTreeFiles({ entireHierarchy: true, includeDirs: true });
'_reject' is defined but never used
280function getFilesystem(drive: any, mountpoint: string): Promise<FILESYSTEM> {
281  try {
282    if (process.platform === 'win32') {
283      return new Promise<string | null>((resolve, _reject) => {284        const driveLetter = mountpoint.endsWith('\\') ? mountpoint.substring(0, mountpoint.length - 1) : mountpoint;
285        exec(`fsutil fsinfo volumeinfo ${driveLetter}`, (error, stdout, _stderr) => {
286          if (error) {
'_stderr' is defined but never used
282    if (process.platform === 'win32') {
283      return new Promise<string | null>((resolve, _reject) => {
284        const driveLetter = mountpoint.endsWith('\\') ? mountpoint.substring(0, mountpoint.length - 1) : mountpoint;
285        exec(`fsutil fsinfo volumeinfo ${driveLetter}`, (error, stdout, _stderr) => {286          if (error) {
287            return resolve(null); // if we can't extract the volume info, we simply skip the ReFS detection
288          }
'crypto' is defined but never used
  1import test from 'ava';
  2import * as crypto from 'crypto';  3import * as fse from 'fs-extra';
  4
  5import {