Support editorconfig - #3513
Open
Freed-Wu wants to merge 2 commits into
Open
Conversation
Freed-Wu
force-pushed
the
copilot/support-editorconfig-another-one
branch
from
August 5, 2026 13:04
367f426 to
ac315e5
Compare
Freed-Wu
force-pushed
the
copilot/support-editorconfig-another-one
branch
from
August 6, 2026 04:52
72371d8 to
3dcd562
Compare
e-kwsm
requested changes
Aug 7, 2026
e-kwsm
requested changes
Aug 7, 2026
e-kwsm
left a comment
Collaborator
There was a problem hiding this comment.
Without .editorconfig, shellcheck issues SC2148:
$ echo 'pushd foo || exit' > x
$ shellcheck x
In x line 1:
pushd foo || exit
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
For more information:
https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...But when .editorconfig specifies a wrong shell, SC2148 is not issued
$ > .editorconfig cat << 'EOF'
root = true
[*]
shellcheck.shell = zsh
# XXX: zsh is not supported
EOF
$ shellcheck x # no warning
$ shellcheck - < x # stdin, neitherFix EditorConfig section priority, glob depth matching, and root=true search stop Co-authored-by: Freed-Wu <32936898+Freed-Wu@users.noreply.github.com>
Co-authored-by: Freed-Wu <32936898+Freed-Wu@users.noreply.github.com>
Freed-Wu
force-pushed
the
copilot/support-editorconfig-another-one
branch
from
August 7, 2026 11:49
3dcd562 to
5da4a5f
Compare
e-kwsm
requested changes
Aug 7, 2026
e-kwsm
left a comment
Collaborator
There was a problem hiding this comment.
root =→ No warnings/errors are issued.
root = true
[*]
shellcheck.shell =→ SC1134 is issued but the location is incorrect
$ shellcheck -s bash x
In x line 1:
pushd foo || exit
^-- SC1134 (error): Failed to process x, line 1: Fix any mentioned problems and try again.
For more information:
https://www.shellcheck.net/wiki/SC1134 -- Failed to process x, line 1: Fix...root = true
[*]
shellcheck.disable = abc→ the same as above
e-kwsm
reviewed
Aug 7, 2026
| ('}':rest'') -> | ||
| "(" ++ intercalate "|" (map go (splitCommas body)) ++ ")" ++ go rest'' | ||
| _ -> "\\{" ++ go rest | ||
| go (c:rest) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1843, Fix #2128
So we can use
.editorconfigor global~/.config/editorconfig.ini:Refer termux-language-server for filenames.
Add a command line option
--file-name=FILEto specify the file name when input is read from stdin. This allows bash-language-serverFinal result:
PS: If someone want to realize #1844 #356 , can extend the config:
PKGBUILD.d.sh: