As others have stated, $HOME in the snap is ~/snap/shfmt/current so shfmt already has access to $HOME/.editorconfig so the snap should really be adjusted to use this. It is possible that the snap is using getpwent or similar to determine the user’s home directory. If so, perhaps upstream would take a patch to evaluate $HOME instead, falling back to getpwent/etc if it isn’t set?
Also, the name .editorconfig is quite general. Is this a file that is created by shfmt? Is there documentation for shfmt discussing this file?
@jdstrand - .editorconfig is a standard name and format for overriding and distributing editor configuration.
From the site:
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.
OK - I think I have run into a bigger issue. I spoke to the upstream dev to clarify how the feature is intended to operate. The file is not actually meant to exist there (which actually makes sense to me). The .editorconfig is actually supposed to be in the root of your project.
Now here is where the issue comes in - we cannot control where a developer may keep their code. In home, a separate drive, on an external device, etc.
Now because this is deviating from the original topic here, I should likely start a new thread. Or I am wondering if I should be simply starting a new thread requesting classic confinement as I am not sure how to approach this otherwise.
I know classic is to be avoided, but I’m not sure how to combat. I am going to go read docs in case there was a new feature I am not aware of. But welcome feedback.
Approval for personal-files will still need to be voted on - from my perspective, +1 from me for read access to ~/.editorconfig - can you please name this dot-editorconfig rather than the current read-editorconfig so it is clearer to users what this provides?