Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update cli yargs config to highlight "ruleset*" options are mutually exclusive. #308

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/repolinter.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ require('yargs')
.option('rulesetFile', {
alias: 'r',
describe:
'Specify an alternate location for the repolinter configuration to use (This will default to repolinter.json/repolinter.yaml at the root of the project, or the internal default ruleset if none is found).',
'Specify an alternate file location for repolinter configuration to use. This option is mutually exclusive from all other "ruleset*" options. If no "ruleset*" option provided, repolinter will use default repolinter.json/repolinter.yaml at the root of the project.',
type: 'string'
})
.option('rulesetUrl', {
alias: 'u',
describe:
'Specify an alternate URL repolinter configuration to use (This will default to repolinter.json/repolinter.yaml at the root of the project, or the internal default ruleset if none is found).',
'Specify an alternate URL location for repolinter configuration to use. This option is mutually exclusive from all other "ruleset*" options. If no "ruleset*" option provided, repolinter will use default repolinter.json/repolinter.yaml at the root of the project.',
type: 'string'
})
.option('rulesetEncoded', {
alias: 'c',
describe:
'Specify a base64 encoded ruleset that repolinter will decode and use instead.',
'Specify a base64 encoded ruleset that repolinter will decode and use instead. This option is mutually exclusive from all other "ruleset*" options. If no "ruleset*" option provided, repolinter will use default repolinter.json/repolinter.yaml at the root of the project',
type: 'string'
})
.option('git', {
Expand All @@ -67,6 +67,8 @@ require('yargs')
default: 'console',
type: 'string'
})
.conflicts('rulesetFile', ['rulesetUrl', 'rulesetEncoded'])
.conflicts('rulesetEncoded', 'rulesetUrl')
},
async (/** @type {any} */ argv) => {
let tmpDir = null
Expand Down
Loading