dense-analysis / dense-analysis/ale

ALE mistakenly thinks `$HOME` is the project root for Python code

Open
#4,636 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 12 2023 09:31:27)
macOS version - arm64

## What went wrong

ALE mistakenly thinks `$HOME` is the project root for Python code.

Specifically, ALE tries to figure out the Python project root using `ale#python#FindProjectRootIni` which looks for a set of cue files (but not `setup.py`)

Because there is often a global `.pylintrc` in `$HOME` as in my case, ALE thinks that is the project root and a bunch of tools stop working correctly with this.

There is of course a possibility that `$HOME` *is* the project root, but it cannot be deduced by the fact that there exists a global configuration file for pylint.

I suggest stopping the Upwards at `$HOME` or something.

## Reproducing the bug

Create a global pylintrc or one of the other dozen files listed in the function, have an oldstyle setup.py.

### :ALEInfo
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.