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

Fix issue where output format mode would not change to full if preview mode was set in configuration file #9763

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

snowsignal
Copy link
Contributor

Summary

This was causing build failures for #9599. We were referencing the command line overrides instead of the merged configuration data, hence the issue.

Test Plan

A snapshot test was added.

@snowsignal snowsignal added the bug Something isn't working label Feb 1, 2024
@snowsignal snowsignal force-pushed the jane/bugs/fix-output-format-preview-mode branch from 63c69ed to dda469e Compare February 1, 2024 21:24
crates/ruff/src/lib.rs Outdated Show resolved Hide resolved
@zanieb
Copy link
Member

zanieb commented Feb 1, 2024

cc @AlexWaygood

@AlexWaygood
Copy link
Member

I think the added test also passes on the main branch. I was having difficulty finding a test that would fail for me on the main branch as a result of this issue. But the change looks correct to me, anyway!

Copy link
Contributor

github-actions bot commented Feb 1, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 2 project errors)

demisto/content (error)

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in your configuration:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'
  - 'per-file-ignores' -> 'lint.per-file-ignores'


ruff failed
  Cause: Rule `PGH002` was removed and cannot be selected.

sphinx-doc/sphinx (error)

warning: The `show-source` option has been deprecated in favor of `output-format`'s "full" and "concise" variants. Please update your configuration to use `output-format = <full|concise>` instead.
warning: `RUF011` has been remapped to `B035`.
warning: `TCH006` has been remapped to `TCH010`.
ruff failed
  Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
	- FURB113
	- FURB131
	- FURB132

Linter (preview)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 2 project errors)

demisto/content (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in your configuration:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'
  - 'per-file-ignores' -> 'lint.per-file-ignores'


ruff failed
  Cause: Rule `PGH002` was removed and cannot be selected.

sphinx-doc/sphinx (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

warning: The `show-source` option has been deprecated in favor of `output-format`'s "full" and "concise" variants. Please update your configuration to use `output-format = <full|concise>` instead.
warning: `RUF011` has been remapped to `B035`.
warning: `TCH006` has been remapped to `TCH010`.
ruff failed
  Cause: Selection of deprecated rule `ANN102` is not allowed when preview is enabled.

@zanieb
Copy link
Member

zanieb commented Feb 1, 2024

I think the added test also passes on the main branch. I was having difficulty finding a test that would fail for me on the main branch as a result of this issue. But the change looks correct to me, anyway!

Really? That doesn't make sense to me. We should try to have a regression test.

@zanieb
Copy link
Member

zanieb commented Feb 1, 2024

Going to merge so we can move forward with the release. We should investigate more separately.

@zanieb zanieb merged commit 148b64e into main Feb 1, 2024
17 checks passed
@zanieb zanieb deleted the jane/bugs/fix-output-format-preview-mode branch February 1, 2024 22:07
@AlexWaygood
Copy link
Member

Thanks for the quick fix @snowsignal! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants