Skip to content

Commit a155b6a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: Added support for harper in markdown files (dense-analysis#5104) fix(phpcs): run from project root instead of file directory (dense-analysis#5105) support running solargraph via bundle (dense-analysis#5097) Fix dense-analysis#5062 - Keep ALE LSP compatible with Neovim 0.10 and 0.11+ Tell OpenCode how to write ALE code feat(rstcheck): Add automatic --config support with version check (dense-analysis#5095) Truncate astro test files to quiet dependabot Skip ALE docker download attempts doc goimport (dense-analysis#5093) refactor: use ale#Pad for option padding across the codebase (dense-analysis#5091) add option to lint diff buffers (dense-analysis#3185)
2 parents 164eae6 + 3d3b75c commit a155b6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+721
-104
lines changed

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ALE Agent instructions
2+
3+
1. Read documentation from `doc/ale-development.txt` to understand how to be an
4+
ALE developer.
5+
2. Run Vader/Vim tests with `./run-tests -q --fast test/path/some_file.vader`
6+
3. When editing Lua code run Lua tests with `./run-tests -q --lua-only`

ale_linters/cpp/clazy.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function! ale_linters#cpp#clazy#GetCommand(buffer) abort
1818
return '%e'
1919
\ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '')
2020
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
21-
\ . (!empty(l:options) ? ' ' . l:options : '')
21+
\ . ale#Pad(l:options)
2222
\ . ' %s'
2323
endfunction
2424

ale_linters/cs/mcs.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function! ale_linters#cs#mcs#GetCommand(buffer) abort
44
let l:options = ale#Var(a:buffer, 'cs_mcs_options')
55

66
return 'mcs -unsafe --parse'
7-
\ . (!empty(l:options) ? ' ' . l:options : '')
7+
\ . ale#Pad(l:options)
88
\ . ' %t'
99
endfunction
1010

ale_linters/go/revive.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function! ale_linters#go#revive#GetCommand(buffer) abort
88
let l:options = ale#Var(a:buffer, 'go_revive_options')
99

1010
return ale#go#EnvString(a:buffer) . '%e'
11-
\ . (!empty(l:options) ? ' ' . l:options : '')
11+
\ . ale#Pad(l:options)
1212
\ . ' %t'
1313
endfunction
1414

ale_linters/go/staticcheck.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ function! ale_linters#go#staticcheck#GetCommand(buffer) abort
1313

1414
if l:lint_package
1515
return l:env . '%e'
16-
\ . (!empty(l:options) ? ' ' . l:options : '') . ' .'
16+
\ . ale#Pad(l:options) . ' .'
1717
endif
1818

1919
return l:env . '%e'
20-
\ . (!empty(l:options) ? ' ' . l:options : '')
20+
\ . ale#Pad(l:options)
2121
\ . ' %s:t'
2222
endfunction
2323

ale_linters/groovy/npmgroovylint.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function! ale_linters#groovy#npmgroovylint#GetCommand(buffer) abort
88
let l:options = ale#Var(a:buffer, 'groovy_npmgroovylint_options')
99

1010
return '%e --failon none --output json'
11-
\ . (!empty(l:options) ? ' ' . l:options : '')
11+
\ . ale#Pad(l:options)
1212
\ . ' %t'
1313
endfunction
1414

ale_linters/html/stylelint.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function! ale_linters#html#stylelint#GetCommand(buffer) abort
1515
let l:options = ale#Var(a:buffer, 'html_stylelint_options')
1616

1717
return ale#Escape(l:executable)
18-
\ . (!empty(l:options) ? ' ' . l:options : '')
18+
\ . ale#Pad(l:options)
1919
\ . ' --no-color --stdin-filename %s'
2020
endfunction
2121

ale_linters/javascript/standard.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function! ale_linters#javascript#standard#GetCommand(buffer) abort
1919
let l:options = ale#Var(a:buffer, 'javascript_standard_options')
2020

2121
return ale#node#Executable(a:buffer, l:executable)
22-
\ . (!empty(l:options) ? ' ' . l:options : '')
22+
\ . ale#Pad(l:options)
2323
\ . ' --stdin %s'
2424
endfunction
2525

ale_linters/markdown/harper.vim

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
" Author: Armand Halbert <armand.halbert@gmail.com>
2+
" Description: Harper for Markdown files
3+
4+
call ale#Set('markdown_harper_config', {
5+
\ 'harper-ls': {
6+
\ 'diagnosticSeverity': 'hint',
7+
\ 'dialect': 'American',
8+
\ 'linters': {
9+
\ 'SpellCheck': v:true,
10+
\ 'SentenceCapitalization': v:true,
11+
\ 'RepeatedWords': v:true,
12+
\ 'LongSentences': v:true,
13+
\ 'AnA': v:true,
14+
\ 'Spaces': v:true,
15+
\ 'SpelledNumbers': v:false,
16+
\ 'WrongQuotes': v:false,
17+
\ },
18+
\ },
19+
\})
20+
21+
call ale#linter#Define('markdown', {
22+
\ 'name': 'harper',
23+
\ 'lsp': 'stdio',
24+
\ 'executable': 'harper-ls',
25+
\ 'command': '%e --stdio',
26+
\ 'project_root': function('ale_linters#markdown#harper#GetProjectRoot'),
27+
\ 'lsp_config': {b -> ale#Var(b, 'markdown_harper_config')},
28+
\})
29+
30+
function! ale_linters#markdown#harper#GetProjectRoot(buffer) abort
31+
return fnamemodify(bufname(a:buffer), ':p:h')
32+
endfunction

ale_linters/markdown/markdownlint.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function! ale_linters#markdown#markdownlint#GetCommand(buffer) abort
1414
let l:options = ale#Var(a:buffer, 'markdown_markdownlint_options')
1515

1616
return ale#Escape(l:executable)
17-
\ . (!empty(l:options) ? ' ' . l:options : '') . ' %s'
17+
\ . ale#Pad(l:options) . ' %s'
1818
endfunction
1919

2020
call ale#linter#Define('markdown', {

0 commit comments

Comments
 (0)