Skip to content

Commit

Permalink
Fix CodeQL warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Oct 22, 2023
1 parent c403042 commit 0da6cfc
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/cli/wikigdrive-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

import path from 'path';
import fs from 'fs';
import minimist from 'minimist';
import dotenv from 'dotenv';
import {fileURLToPath} from 'url';
Expand Down
1 change: 1 addition & 0 deletions src/containers/google_folder/UploadContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class UploadContainer extends Container {
if (file.id && file.id !== 'TO_FILL' && entry.performRewrite) {
const rewrittenHtml = await this.rewriteLinks(entry.performRewrite, entry.path);
const response = await this.googleDriveService.update(access_token, entry.parent, file.title, MimeTypes.HTML, rewrittenHtml, file.id);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable response.
this.logger.info('[' + entry.path + ']: updated links');
}
break;
}
Expand Down
3 changes: 0 additions & 3 deletions src/containers/server/routes/GoogleDriveController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
RouteGet,
RouteParamPath,
RouteParamUser,
RoutePost,
RouteResponse
} from './Controller';
import {FileContentService} from '../../../utils/FileContentService';
Expand All @@ -13,8 +12,6 @@ import {UserConfigService} from '../../google_folder/UserConfigService';
import {MarkdownTreeProcessor} from '../../transform/MarkdownTreeProcessor';
import {getContentFileService} from '../../transform/utils';
import {GoogleTreeProcessor} from '../../google_folder/GoogleTreeProcessor';
import {GoogleApiContainer} from '../../google_api/GoogleApiContainer';
import {GoogleDriveService} from '../../../google/GoogleDriveService';
import {UserAuthClient} from '../../../google/AuthClient';
import {filterParams} from '../../../google/driveFetch';

Expand Down
1 change: 0 additions & 1 deletion src/google/GoogleDriveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {FileId} from '../model/model';
import {driveFetch, driveFetchMultipart, driveFetchStream} from './driveFetch';
import {QuotaLimiter} from './QuotaLimiter';
import {HasAccessToken} from './AuthClient';
import {markdownToHtml} from './markdownToHtml';

export interface Changes {
token: string;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/logger/JobLogFileProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class JobLogFileProcessor {
processLogFile(logFile: string): Promise<LogLine[]> {
return new Promise((resolve, reject) => {
const results = [];
const [readStream, stream] = this.createReadStream(logFile);
const [, stream] = this.createReadStream(logFile);

stream.on('error', (err) => {
if (stream.readable) {
Expand Down

0 comments on commit 0da6cfc

Please sign in to comment.