This should help clean up the lint function in index.js to not trying to figure out is it a path/url/encoded question.
Motivation
The current design of the lint function in index.js spends much effort trying to figure out how to ingest ruleset config correctly.
Adding conflicts in yargs creates a 3-way option exclusion, so we can have better control over CLI option intake.
I have some plan to update the lint function to call a new lintEngine function, so the existing exposed lint function will remain the same, but we'll use a new lintEngine function to separate rulesetPath, rulesetUrl and rulesetEncoded.
It would also help separate --allowPaths and future --ignorePaths option, since I don't see an easy way to add the proposed --ignorePaths easily in current setup.
This should be expected behavior of how customer use the repolinter cli tool, and I'm not testing yargs here.
So I didn't add any additional testing.
Passed all existing tests.
This should help clean up the
lint
function in index.js to not trying to figure outis it a path/url/encoded
question.Motivation
The current design of the
lint
function inindex.js
spends much effort trying to figure out how to ingest ruleset config correctly. Addingconflicts
inyargs
creates a 3-way option exclusion, so we can have better control over CLI option intake.I have some plan to update the
lint
function to call a newlintEngine
function, so the existing exposedlint
function will remain the same, but we'll use a newlintEngine
function to separaterulesetPath
,rulesetUrl
andrulesetEncoded
. It would also help separate--allowPaths
and future--ignorePaths
option, since I don't see an easy way to add the proposed--ignorePaths
easily in current setup.Proposed Changes
Add the conflicts to create a 3-way exclusion.
Test Plan
This should be expected behavior of how customer use the repolinter cli tool, and I'm not testing yargs here. So I didn't add any additional testing. Passed all existing tests.