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

ruff server still doesn't check E30* errors #11277

Closed
a1401358759 opened this issue May 4, 2024 · 2 comments · Fixed by #11283
Closed

ruff server still doesn't check E30* errors #11277

a1401358759 opened this issue May 4, 2024 · 2 comments · Fixed by #11283
Labels
bug Something isn't working server Related to the LSP server

Comments

@a1401358759
Copy link

a1401358759 commented May 4, 2024

ruff version: 0.4.3

my lsp config

return {
  filetypes = { "python" },
  single_file_support = true,
  cmd = { "ruff", "server", "--preview" },
  settings = {
    configuration = "~/.config/nvim/pyproject.toml",
  },
}

my pyprohect.toml

[tool.ruff]
preview = true
# Exclude a variety of commonly ignored directories.
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".ipynb_checkpoints",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pyenv",
    ".pytest_cache",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    ".vscode",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "site-packages",
    "venv",
]

# Same as Black.
line-length = 120
indent-width = 4

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`)  codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = ["E402","E501","N802","N803","N806","N801","N813","N815","N816","RUF001","RUF002","RUF003","RUF012","ARG001"]
extend-select = ["E", "N", "W", "ARG", "RUF"]

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false

# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"

but ruff server still doesn't check E30* errors

image

Is there still a problem with my configuration?

Originally posted by @a1401358759 in #10814 (comment)

@a1401358759 a1401358759 changed the title ruff server still doesn't check E30* erro ruff server still doesn't check E30* errors May 4, 2024
@a1401358759
Copy link
Author

@snowsignal

@charliermarsh
Copy link
Member

Can you use the full path to the file rather than a ~?

@charliermarsh charliermarsh added bug Something isn't working server Related to the LSP server labels May 4, 2024
charliermarsh added a commit that referenced this issue May 4, 2024
## Summary

Users can now include tildes and environment variables in the provided
path, just like with `--config`.

Closes #11277.

## Test Plan

Set the configuration path to `"ruff.configuration": "~/x.toml"`;
verified that the server attempted to read from `/Users/crmarsh/x.toml`.

![Screenshot 2024-05-04 at 1 31
43 PM](https://github.com/astral-sh/ruff/assets/1309177/ea9829cd-6d8a-4818-a47c-dcff9219e996)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Related to the LSP server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants