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

feat: add relative path resolving to rulesetPath #306

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

zhaoyuheng200
Copy link
Member

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.

index.js Outdated Show resolved Hide resolved
@zhaoyuheng200 zhaoyuheng200 marked this pull request as draft October 21, 2023 01:58
@zhaoyuheng200 zhaoyuheng200 marked this pull request as ready for review October 21, 2023 23:53
zhaoyuheng200 and others added 5 commits October 25, 2023 12:32
Signed-off-by: Neil Zhao <[email protected]>
Instead of trying to resolve the file that doesn't exists and path too long  (`system errors`), set `ruleset` to null in 38f9d5 for those scenarios to output those error as `application errors`

Signed-off-by: Neil Zhao <[email protected]>
Signed-off-by: Neil Zhao <[email protected]>
@hyandell
Copy link
Member

Thanks Neil :)

@hyandell hyandell merged commit 9b596a7 into todogroup:main Oct 27, 2023
16 checks passed
@zhaoyuheng200 zhaoyuheng200 deleted the rulesetPath branch October 27, 2023 17:29
@zhaoyuheng200 zhaoyuheng200 restored the rulesetPath branch June 5, 2024 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants