It would be great if pylint could use $XDG_DATA_DIR to store its data (at least ~/.pylint.d).
Why? What is XDG_DATA_DIR and why is it so important?
Here is an explaination of why this matters: http://gk2.sk/the-ugly-duckling-called-xdg_config_home/
Here is the complete spec: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
@PCManticore I understand that adding more config path options is never great, but ideally this would deprecate ~/.pylintrc.
This will never happen.
@PCManticore , care to reconsider that decision? Since this issue was opened, a LOT of software migrated to XDG Standard:
python and pip use ~/.local and ~/.cache extensivelygit uses ~/.config/git/config if it exists, otherwise fallback to ~/.gitconfig~/.cache, (but not yet ~/.config)You don't need change current locations: just use the XDG ones if they exist, otherwise fall back to $HOME just like it is now. For current users absolutely _nothing_ changes.
~/.pylint.d/ is a _perfect_ candidate for ~/.cache/pylint/ or ~/.local/share/pylint depending on how permanent that data is supposed to be.~/.pylintrc fits ~/.config/pylintrc very nicely.It's very easy to implement, and I can provide a patch if it helps. The number of negative reactions alone on "_This will never happen_" is an indication how strong is the demand of this feature.
Please consider adding this. I understand the hesitation 3+ years ago, but today we are seeing XDG become the new standard when it comes to the organization of everyone's program's configuration files, especially when we are getting into an age of many programs that have the potential of cluttering up our home directory. I'm a believer in the Unix philosophy, but it comes with the (hopefully temporary) downside of having everything in ~/.
I would say since 3 years ago, about 80-90% of the programs that I use (and have started using since) all hold their configuration files organized through XDG. The only ones that seem to have an issue with integrating this is Firefox (this is why I use Chromium now), Thunderbird (this is why I use Mutt now), and Tmux (sure, they added a check for a tmux folder in .config, but that still isn't XDG. XDG allows me to put my config files anywhere I please). Now, pylint is in that mix. I've enjoyed Pylint til now, and I don't want to change that.
Why do I love XDG so much? I can carry around my entire configuration on a USB, plug it into a computer I am working on, backup the person's directory listings, and utilize XDG. Then I don't have to worry that they already have Tmux, their own config for programs that I also use, etc. Finally, I leave without a trace and without any disturbance to the client's files/configs.
Again, please reconsider. Thank you for coming to my Ted Talk.
If you want move you pylint directory to $XDG_DATA_HOME, you can append
if [[ -d "$XDG_DATA_HOME/pylint" ]]
then
export PYLINTHOME="$XDG_DATA_HOME/pylint"
fi
to your .bashrc, .zshrc, /etc/bash.bashrc,or /etc/zsh/zshenv and then create a "pylint" folder in your $XDG_DATA_HOME which is $HOME/.local/share by default.
reference : https://github.com/PyCQA/pylint/blob/master/pylint/config/__init__.py#L54-L62
If you want move you pylint directory to $XDG_DATA_HOME, you can append
if [[ -d "$XDG_DATA_HOME/pylint" ]] then export PYLINTHOME="$XDG_DATA_HOME/pylint" fito your .bashrc, .zshrc, /etc/bash.bashrc,or /etc/zsh/zshenv and then create a "pylint" folder in your $XDG_DATA_HOME which is $HOME/.local/share by default.
reference : https://github.com/PyCQA/pylint/blob/master/pylint/config/__init__.py#L54-L62
A few notes:
$XDG_DATA_HOME, always use ${XDG_DATA_HOME:-$HOME/.local/share}, so it gets the default path in case XDG_DATA_HOME is not set, as is the case in most systems.PYLINTHOME and pylint will do the rest:export PYLINTHOME=${XDG_DATA_HOME:-$HOME/.local/share}/pylint
Most helpful comment
@PCManticore , care to reconsider that decision? Since this issue was opened, a LOT of software migrated to XDG Standard:
pythonandpipuse~/.localand~/.cacheextensivelygituses~/.config/git/configif it exists, otherwise fallback to~/.gitconfig~/.cache, (but not yet~/.config)You don't need change current locations: just use the XDG ones if they exist, otherwise fall back to $HOME just like it is now. For current users absolutely _nothing_ changes.
~/.pylint.d/is a _perfect_ candidate for~/.cache/pylint/or~/.local/share/pylintdepending on how permanent that data is supposed to be.~/.pylintrcfits~/.config/pylintrcvery nicely.It's very easy to implement, and I can provide a patch if it helps. The number of negative reactions alone on "_This will never happen_" is an indication how strong is the demand of this feature.