todogroup / repolinter

Repolinter, The Open Source Repository Linter
https://todogroup.github.io/repolinter/
Apache License 2.0
421 stars 72 forks source link

feat: add capability to resolve rulesetPath relative to console context #305

Closed zhaoyuheng200 closed 11 months ago

zhaoyuheng200 commented 11 months ago

Motivation

When specifying rulesetPath with -r option, the rulesetPath will use the target repo path to resolve its relative path. This is not expected terminal behavior in most CLI tooling, the expectation is to resolve the relative path from the current path.

Proposed Changes

While maintaining the current implementation, the rulesetPath logic will try to use the context path if target repo path doesn't exist.

Test Plan

Updated test.