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

🐛A unset value in editorconfig is not supported. #3886

Closed
1 task done
hidekatsu-izuno opened this issue Sep 14, 2024 · 2 comments · Fixed by #3907
Closed
1 task done

🐛A unset value in editorconfig is not supported. #3886

hidekatsu-izuno opened this issue Sep 14, 2024 · 2 comments · Fixed by #3907
Assignees
Labels
A-Formatter Area: formatter A-Project Area: project S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@hidekatsu-izuno
Copy link

Environment information

CLI:
  Version:                      1.9.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

  1. I have the next .editorconfig on project root
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[/tests/data/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
  1. I set formatter.useEditorconfig to true
  2. I saw the next error message
  ✖ Failed to parse the .editorconfig file.
    
    Caused by:
      Custom("unknown variant `unset`, expected one of `lf`, `crlf`, `cr`")

Expected result

The unset value for the property seems to be the correct value according to the editorconfig site.
I use for ignoring test files.

Hopefully this feature will be supported.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Project Area: project S-Bug-confirmed Status: report has been confirmed as a valid bug A-Formatter Area: formatter labels Sep 14, 2024
@dyc3
Copy link
Contributor

dyc3 commented Sep 14, 2024

Huh, I missed that part of the spec. I'm not entirely sure if we have a "revert to default" behavior for our configuration, so it's a little unclear how exactly this would map onto our logic.

@Conaclos
Copy link
Member

Huh, I missed that part of the spec. I'm not entirely sure if we have a "revert to default" behavior for our configuration, so it's a little unclear how exactly this would map onto our logic.

We could emit a warning as the one we emit when we encounter a setting we don't handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Project Area: project S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants