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(oxlint): auto detect config file in CLI #7348

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Sysix
Copy link
Contributor

@Sysix Sysix commented Nov 18, 2024

waiting fior #7352

Copy link

graphite-app bot commented Nov 18, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-cli Area - CLI C-enhancement Category - New feature or request labels Nov 18, 2024
Boshen pushed a commit that referenced this pull request Nov 20, 2024
allows to use multiple `LintRunner` in one file targeting multiple
directory.
The current problem is for the test in #7348 we can not change
`env::current_dir`,
so as a workaround I introduce a new property :) 

See more info here:
https://discord.com/channels/1079625926024900739/1117322804291964931/1308179827576016897
let result = test_with_cwd("fixtures/auto_config_detection", args);
assert_eq!(result.number_of_files, 1);
assert_eq!(result.number_of_warnings, 0);
assert_eq!(result.number_of_errors, 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't debugger on by default since it's in correctness ?
so if it failed to pick up the config, it would still return 1 here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will output it as an warning not an error.
Deleting the oxlint.json the assertion should be:

assert_eq!(result.number_of_warnings, 1);
assert_eq!(result.number_of_errors, 0);

@Sysix Sysix marked this pull request as ready for review November 20, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area - CLI C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants