Resolve violations of sort-imports lint

Resolves #206
This commit is contained in:
Chris Raynor 2020-09-29 14:43:37 +01:00
parent bb6fa8ee6d
commit 228546a1e5
No known key found for this signature in database
GPG key ID: 579A1FBC36FDA261
87 changed files with 273 additions and 243 deletions

View file

@ -1,6 +1,8 @@
import test from "ava";
import sinon from "sinon";
import * as actionsutil from "./actions-util";
import sinon from "sinon";
import test from "ava";
import { setupTests } from "./testing-utils";
setupTests(test);

View file

@ -1,9 +1,9 @@
import * as api from "./api-client";
import * as core from "@actions/core";
import * as sharedEnv from "./shared-environment";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as api from "./api-client";
import * as sharedEnv from "./shared-environment";
import { isLocalRun, GITHUB_DOTCOM_URL } from "./util";
import { GITHUB_DOTCOM_URL, isLocalRun } from "./util";
/**
* Wrapper around core.getInput for inputs that always have a value.

View file

@ -1,8 +1,9 @@
import * as analysisPaths from "./analysis-paths";
import * as util from "./util";
import test from "ava";
import * as analysisPaths from "./analysis-paths";
import { setupTests } from "./testing-utils";
import * as util from "./util";
setupTests(test);

View file

@ -1,4 +1,5 @@
import * as configUtils from "./config-utils";
import { Logger } from "./logging";
function isInterpretedLanguage(language): boolean {

View file

@ -1,12 +1,13 @@
import * as core from "@actions/core";
import * as actionsUtil from "./actions-util";
import { AnalysisStatusReport, runAnalyze } from "./analyze";
import { getConfig } from "./config-utils";
import { getActionsLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import * as core from "@actions/core";
import * as util from "./util";
import { AnalysisStatusReport, runAnalyze } from "./analyze";
import { getActionsLogger } from "./logging";
import { getConfig } from "./config-utils";
import { parseRepositoryNwo } from "./repository";
interface FinishStatusReport
extends actionsUtil.StatusReportBase,
AnalysisStatusReport {}

View file

@ -1,13 +1,14 @@
import test from "ava";
import * as fs from "fs";
import * as util from "./util";
import test from "ava";
import { runQueries } from "./analyze";
import { setCodeQL } from "./codeql";
import { Config } from "./config-utils";
import { Language } from "./languages";
import { getRunnerLogger } from "./logging";
import { runQueries } from "./analyze";
import { setCodeQL } from "./codeql";
import { setupTests } from "./testing-utils";
import * as util from "./util";
setupTests(test);

View file

@ -1,16 +1,16 @@
import * as analysisPaths from "./analysis-paths";
import * as configUtils from "./config-utils";
import * as fs from "fs";
import * as path from "path";
import * as analysisPaths from "./analysis-paths";
import { getCodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { isScannedLanguage } from "./languages";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";
import * as sharedEnv from "./shared-environment";
import * as upload_lib from "./upload-lib";
import * as util from "./util";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";
import { getCodeQL } from "./codeql";
import { isScannedLanguage } from "./languages";
export interface QueriesStatusReport {
// Time taken in ms to analyze builtin queries for cpp (or undefined if this language was not analyzed)
analyze_builtin_queries_cpp_duration_ms?: number;

View file

@ -1,9 +1,11 @@
import * as githubUtils from "@actions/github/lib/utils";
import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";
import * as path from "path";
import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";
import { getRequiredEnvParam, getRequiredInput } from "./actions-util";
import { isLocalRun } from "./util";
export const getApiClient = function (

View file

@ -1,8 +1,9 @@
import * as actionsUtil from "./actions-util";
import * as config_utils from "./config-utils";
import * as core from "@actions/core";
import * as actionsUtil from "./actions-util";
import { determineAutobuildLanguage, runAutobuild } from "./autobuild";
import * as config_utils from "./config-utils";
import { Language } from "./languages";
import { getActionsLogger } from "./logging";

View file

@ -1,7 +1,9 @@
import { getCodeQL } from "./codeql";
import * as config_utils from "./config-utils";
import { Language, isTracedLanguage } from "./languages";
import { Logger } from "./logging";
import { getCodeQL } from "./codeql";
export function determineAutobuildLanguage(
config: config_utils.Config,

View file

@ -1,13 +1,14 @@
import * as toolcache from "@actions/tool-cache";
import test from "ava";
import nock from "nock";
import * as path from "path";
import * as codeql from "./codeql";
import * as defaults from "./defaults.json";
import * as path from "path";
import * as toolcache from "@actions/tool-cache";
import * as util from "./util";
import nock from "nock";
import test from "ava";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import * as util from "./util";
import * as defaults from "./defaults.json";
setupTests(test);

View file

@ -1,22 +1,23 @@
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as http from "@actions/http-client";
import { IHeaders } from "@actions/http-client/interfaces";
import * as toolcache from "@actions/tool-cache";
import * as api from "./api-client";
import * as defaults from "./defaults.json"; // Referenced from codeql-action-sync-tool!
import * as fs from "fs";
import * as globalutil from "util";
import * as http from "@actions/http-client";
import * as path from "path";
import * as semver from "semver";
import * as stream from "stream";
import * as globalutil from "util";
import * as toolcache from "@actions/tool-cache";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as util from "./util";
import uuidV4 from "uuid/v4";
import { getRequiredEnvParam } from "./actions-util";
import * as api from "./api-client";
import * as defaults from "./defaults.json"; // Referenced from codeql-action-sync-tool!
import { errorMatchers } from "./error-matcher";
import { IHeaders } from "@actions/http-client/interfaces";
import { Language } from "./languages";
import { Logger } from "./logging";
import { errorMatchers } from "./error-matcher";
import { getRequiredEnvParam } from "./actions-util";
import { toolrunnerErrorCatcher } from "./toolrunner-error-catcher";
import * as util from "./util";
type Options = Array<string | number | boolean>;

View file

@ -1,16 +1,18 @@
import * as github from "@actions/github";
import test from "ava";
import * as fs from "fs";
import * as path from "path";
import sinon from "sinon";
import * as api from "./api-client";
import { getCachedCodeQL, setCodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import * as fs from "fs";
import * as github from "@actions/github";
import * as path from "path";
import * as util from "./util";
import sinon from "sinon";
import test from "ava";
import { getCachedCodeQL, setCodeQL } from "./codeql";
import { Language } from "./languages";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import * as util from "./util";
setupTests(test);

View file

@ -1,11 +1,12 @@
import * as fs from "fs";
import * as yaml from "js-yaml";
import * as path from "path";
import * as api from "./api-client";
import { CodeQL, ResolveQueriesOutput } from "./codeql";
import * as externalQueries from "./external-queries";
import * as fs from "fs";
import * as path from "path";
import * as yaml from "js-yaml";
import { CodeQL, ResolveQueriesOutput } from "./codeql";
import { Language, parseLanguage } from "./languages";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";

View file

@ -1,12 +1,13 @@
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import test from "ava";
import * as externalQueries from "./external-queries";
import * as fs from "fs";
import * as path from "path";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as util from "./util";
import test from "ava";
import * as externalQueries from "./external-queries";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import * as util from "./util";
setupTests(test);

View file

@ -1,6 +1,6 @@
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as fs from "fs";
import * as path from "path";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import { Logger } from "./logging";

View file

@ -1,9 +1,10 @@
import test from "ava";
import * as ava from "ava";
import * as fingerprints from "./fingerprints";
import * as fs from "fs";
import * as path from "path";
import * as fingerprints from "./fingerprints";
import test from "ava";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";

View file

@ -1,4 +1,5 @@
import * as fs from "fs";
import Long from "long";
import { Logger } from "./logging";

View file

@ -1,9 +1,10 @@
import * as actionsUtil from "./actions-util";
import * as configUtils from "./config-utils";
import * as core from "@actions/core";
import * as actionsUtil from "./actions-util";
import { CodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { initCodeQL, initConfig, injectWindowsTracer, runInit } from "./init";
import { CodeQL } from "./codeql";
import { getActionsLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";

View file

@ -1,14 +1,15 @@
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as analysisPaths from "./analysis-paths";
import * as configUtils from "./config-utils";
import * as fs from "fs";
import * as path from "path";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as util from "./util";
import * as analysisPaths from "./analysis-paths";
import { CodeQL, setupCodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { TracerConfig, getCombinedTracerConfig } from "./tracer-config";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";
import { TracerConfig, getCombinedTracerConfig } from "./tracer-config";
import * as util from "./util";
export async function initCodeQL(
codeqlURL: string | undefined,

View file

@ -6,6 +6,7 @@ import {
isTracedLanguage,
parseLanguage,
} from "./languages";
import { setupTests } from "./testing-utils";
setupTests(test);

View file

@ -1,18 +1,19 @@
import { Command } from "commander";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import * as upload_lib from "./upload-lib";
import { runAnalyze } from "./analyze";
import { determineAutobuildLanguage, runAutobuild } from "./autobuild";
import { CodeQL, getCodeQL } from "./codeql";
import { Config, getConfig } from "./config-utils";
import { initCodeQL, initConfig, injectWindowsTracer, runInit } from "./init";
import { Language, parseLanguage } from "./languages";
import { determineAutobuildLanguage, runAutobuild } from "./autobuild";
import { getAddSnippetsFlag, getMemoryFlag, getThreadsFlag } from "./util";
import { initCodeQL, initConfig, injectWindowsTracer, runInit } from "./init";
import { Command } from "commander";
import { getRunnerLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import * as upload_lib from "./upload-lib";
import { getAddSnippetsFlag, getMemoryFlag, getThreadsFlag } from "./util";
import { runAnalyze } from "./analyze";
const program = new Command();
program.version("0.0.1");

View file

@ -1,7 +1,8 @@
import { TestInterface } from "ava";
import * as CodeQL from "./codeql";
import sinon from "sinon";
import * as CodeQL from "./codeql";
import { TestInterface } from "ava";
type TestContext = {
stdoutWrite: any;

View file

@ -1,4 +1,5 @@
import * as exec from "@actions/exec";
import test from "ava";
import { ErrorMatcher } from "./error-matcher";

View file

@ -1,17 +1,19 @@
import test from "ava";
import * as configUtils from "./config-utils";
import * as fs from "fs";
import * as path from "path";
import * as util from "./util";
import test from "ava";
import { setCodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { Language } from "./languages";
import { setupTests } from "./testing-utils";
import {
concatTracerConfigs,
getCombinedTracerConfig,
getTracerConfigForLanguage,
} from "./tracer-config";
import * as util from "./util";
import { Language } from "./languages";
import { setCodeQL } from "./codeql";
import { setupTests } from "./testing-utils";
setupTests(test);

View file

@ -1,10 +1,11 @@
import * as configUtils from "./config-utils";
import * as fs from "fs";
import * as path from "path";
import * as util from "./util";
import { Language, isTracedLanguage } from "./languages";
import { CodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { Language, isTracedLanguage } from "./languages";
import * as util from "./util";
export type TracerConfig = {
spec: string;

View file

@ -1,8 +1,9 @@
import * as uploadLib from "./upload-lib";
import test from "ava";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import * as uploadLib from "./upload-lib";
setupTests(test);

View file

@ -1,17 +1,18 @@
import * as api from "./api-client";
import * as core from "@actions/core";
import fileUrl from "file-url";
import * as fingerprints from "./fingerprints";
import * as fs from "fs";
import * as jsonschema from "jsonschema";
import * as path from "path";
import zlib from "zlib";
import * as api from "./api-client";
import * as fingerprints from "./fingerprints";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";
import * as sharedEnv from "./shared-environment";
import * as util from "./util";
import fileUrl from "file-url";
import zlib from "zlib";
import { Logger } from "./logging";
import { RepositoryNwo } from "./repository";
// Takes a list of paths to sarif files and combines them together,
// returning the contents of the combined sarif file.
export function combineSarifFiles(sarifFiles: string[]): string {

View file

@ -1,9 +1,9 @@
import * as core from "@actions/core";
import * as actionsUtil from "./actions-util";
import * as core from "@actions/core";
import * as upload_lib from "./upload-lib";
import { getActionsLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import * as upload_lib from "./upload-lib";
interface UploadSarifStatusReport
extends actionsUtil.StatusReportBase,

View file

@ -1,10 +1,11 @@
import test from "ava";
import * as fs from "fs";
import * as os from "os";
import * as util from "./util";
import test from "ava";
import { getRunnerLogger } from "./logging";
import { setupTests } from "./testing-utils";
import * as util from "./util";
setupTests(test);