add debug mode to limit output
This commit is contained in:
parent
f80d660e33
commit
6f422a4303
18 changed files with 86 additions and 69 deletions
9
lib/runner.js
generated
9
lib/runner.js
generated
|
|
@ -67,7 +67,6 @@ function checkEnvironmentSetup(config) {
|
|||
"See end out output from 'init' command for instructions.");
|
||||
}
|
||||
}
|
||||
const logger = logging_1.getRunnerLogger();
|
||||
program
|
||||
.command('init')
|
||||
.description('Initializes CodeQL')
|
||||
|
|
@ -81,7 +80,9 @@ program
|
|||
.option('--temp-dir <dir>', 'Directory to use for temporary files. By default will use current working directory.')
|
||||
.option('--tools-dir <dir>', 'Directory to use for CodeQL tools and other files to store between runs. By default will use home directory.')
|
||||
.option('--checkout-path <path>', 'Checkout path (default: current working directory)')
|
||||
.option('--debug', 'Print more verbose output', false)
|
||||
.action(async (cmd) => {
|
||||
const logger = logging_1.getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
const tempDir = getTempDir(cmd.tempDir);
|
||||
const toolsDir = getToolsDir(cmd.toolsDir);
|
||||
|
|
@ -139,7 +140,9 @@ program
|
|||
.description('Attempts to automatically build code')
|
||||
.option('--language <language>', 'The language to build. By default will try to detect the dominant language.')
|
||||
.option('--temp-dir <dir>', 'Directory to use for temporary files. By default will use current working directory.')
|
||||
.option('--debug', 'Print more verbose output', false)
|
||||
.action(async (cmd) => {
|
||||
const logger = logging_1.getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
const config = await config_utils_1.getConfig(getTempDir(cmd.tempDir), logger);
|
||||
checkEnvironmentSetup(config);
|
||||
|
|
@ -176,7 +179,9 @@ program
|
|||
.option('--no-upload', 'Do not upload results after analysis', false)
|
||||
.option('--output-dir <dir>', 'Directory to output SARIF files to. By default will use temp directory.')
|
||||
.option('--temp-dir <dir>', 'Directory to use for temporary files. By default will use current working directory.')
|
||||
.option('--debug', 'Print more verbose output', false)
|
||||
.action(async (cmd) => {
|
||||
const logger = logging_1.getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
const tempDir = getTempDir(cmd.tempDir);
|
||||
const outputDir = cmd.outputDir || path.join(tempDir, 'codeql-sarif');
|
||||
|
|
@ -200,7 +205,9 @@ program
|
|||
.requiredOption('--github-url <url>', 'URL of GitHub instance')
|
||||
.requiredOption('--github-auth <auth>', 'GitHub Apps token, or of the form "username:token" if using a personal access token')
|
||||
.option('--checkout-path <path>', 'Checkout path (default: current working directory)')
|
||||
.option('--debug', 'Print more verbose output', false)
|
||||
.action(async (cmd) => {
|
||||
const logger = logging_1.getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, cmd.ref, undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, cmd.githubAuth, parseGithubUrl(cmd.githubUrl), 'runner', logger);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue