I have ALE configured to lint and fix Ruby and Javascript files. Linting works as expected - the tools are found and I get info in the location list, etc. about changes to be made.

However, fixing the files using the same linters does not work. I have tried both fix on save and manually calling :ALEFix. In both cases nothing happens.

My vim configuration is here: https://github.com/prognostikos/dotfiles/blob/master/vim/vimrc.symlink

:ALEInfo after running :ALEFix follows:

 Current Filetype: ruby                                                                                                                                                         
Available Linters: ['brakeman', 'cspell', 'debride', 'rails_best_practices', 'reek', 'rubocop', 'ruby', 'solargraph', 'sorbet', 'standardrb']                                   
   Linter Aliases:                                                                                                                                                              
'sorbet' -> ['srb']                                                                                                                                                             
  Enabled Linters: ['standardrb']                                                                                                                                               
  Ignored Linters: []                                                                                                                                                           
 Suggested Fixers:                                                                                                                                                              
  'prettier' - Apply prettier to a file.                                                                                                                                        
  'remove_trailing_lines' - Remove all blank lines at the end of a file.                                                                                                        
  'rubocop' - Fix ruby files with rubocop --auto-correct.                                                                                                                       
  'rufo' - Fix ruby files with rufo                                                                                                                                             
  'sorbet' - Fix ruby files with srb tc --autocorrect.                                                                                                                          
  'standardrb' - Fix ruby files with standardrb --fix                                                                                                                           
  'syntax_tree' - Fix ruby files with stree write                                                                                                                               
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.                                                                                       
 Linter Variables:                                                                                                                                                              
let g:ale_ruby_rails_best_practices_executable = 'rails_best_practices'                                                                                                         
let g:ale_ruby_rails_best_practices_options = ''                                                                                                                                
let g:ale_ruby_standardrb_executable = 'standardrb'                                                                                                                             
let g:ale_ruby_standardrb_options = ''                                                                                                                                          
 Global Variables:                                                                                                                                                              
let g:ale_cache_executable_check_failures = v:null                                                                                                                              
let g:ale_change_sign_column_color = 0                                                                                                                                          
let g:ale_command_wrapper = ''                                                                                                                                                  
let g:ale_completion_delay = v:null                                                                                                                                             
let g:ale_completion_enabled = 0                                                                                                                                                
let g:ale_completion_max_suggestions = v:null                                                                                                                                   
let g:ale_disable_lsp = 0                                                                                                                                                       
let g:ale_echo_cursor = 1                                                                                                                                                       
let g:ale_echo_msg_error_str = 'Error'                                                                                                                                          
let g:ale_echo_msg_format = '%code: %%s'                                                                                                                                        
let g:ale_echo_msg_info_str = 'Info'                                                                                                                                            
let g:ale_echo_msg_warning_str = 'Warning'                                                                                                                                      
let g:ale_enabled = 1                                                                                                                                                           
let g:ale_fix_on_save = 1                                                                                                                                                       
let g:ale_fixers = {'ruby': ['standardrb'], 'javascript': ['standard']}                                                                                                         
let g:ale_history_enabled = 1                                                                                                                                                   
let g:ale_history_log_output = 1                                                                                                                                                
let g:ale_keep_list_window_open = 0                                                                                                                                             
let g:ale_lint_delay = 200                                                                                                                                                      
let g:ale_lint_on_enter = 1                                                                                                                                                     
let g:ale_lint_on_filetype_changed = 1                                                                                                                                          
let g:ale_lint_on_insert_leave = 1                                                                                                                                              
let g:ale_lint_on_save = 1                                                                                                                                                      
let g:ale_lint_on_text_changed = 'normal'                                                                                                                                       
let g:ale_linter_aliases = {}                                                                                                                                                   
let g:ale_linters = {'ruby': ['standardrb'], 'javascript': ['standard']}
let g:ale_pattern_options = v:null                                                                                                                                              
let g:ale_pattern_options_enabled = v:null                                                                                                                                      
let g:ale_root = {}                                                                                                                                                             
let g:ale_set_balloons = 0                                                                                                                                                      
let g:ale_set_highlights = 0                                                                                                                                                    
let g:ale_set_loclist = 1                                                                                                                                                       
let g:ale_set_quickfix = 0                                                                                                                                                      
let g:ale_set_signs = 1                                                                                                                                                         
let g:ale_sign_column_always = 0                                                                                                                                                
let g:ale_sign_error = '>>'                                                                                                                                                     
let g:ale_sign_info = '--'                                                                                                                                                      
let g:ale_sign_offset = 1000000                                                                                                                                                 
let g:ale_sign_style_error = '>>'                                                                                                                                               
let g:ale_sign_style_warning = '--'                                                                                                                                             
let g:ale_sign_warning = '--'                                                                                                                                                   
let g:ale_sign_highlight_linenrs = 0                                                                                                                                            
let g:ale_statusline_format = v:null                                                                                                                                            
let g:ale_type_map = {}                                                                                                                                                         
let g:ale_use_neovim_diagnostics_api = 0                                                                                                                                        
let g:ale_use_global_executables = v:null                                                                                                                                       
let g:ale_virtualtext_cursor = 0                                                                                                                                                
let g:ale_warn_about_trailing_blank_lines = 1                                                                                                                                   
let g:ale_warn_about_trailing_whitespace = 1                                                                                                                                    
  Command History:                                                                                                                                                              
(executable check - success) standardrb                                                                                                                                         
(finished - exit code 0) ['/bin/zsh', '-c', '''standardrb'' --format json --force-exclusion  --stdin ''/Users/rohrer/c/bn/mrclean/lib/faraday_middleware/sign_body.rb'' < ''/var
<<<OUTPUT STARTS>>>                                                                                                                                                             
leware/sign_body.rb","offenses":[{"severity":"convention","message":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","cop_n
verity":"convention","message":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","cop_name":"Style/StringLiterals","correcte
cessary spacing detected.","cop_name":"Layout/ExtraSpacing","corrected":true,"correctable":true,"location":{"start_line":6,"start_column":19,"last_line":6,"last_column":23,"len
gth":5,"line":6,"column":19}},{"severity":"convention","message":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","cop_name
erity":"convention","message":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","cop_name":"Style/StringLiterals","corrected
fer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","cop_name":"Style/StringLiterals","corrected":true,"correctable":true,"locatio
n":{"start_line":10,"start_column":15,"last_line":10,"last_column":23,"length":9,"line":10,"column":15}},{"severity":"convention","message":"Closing method call brace must be o
n the line after the last argument when opening brace is on a separate line from the first argument.","cop_name":"Layout/MultilineMethodCallBraceLayout","corrected":true,"corre
ctable":true,"location":{"start_line":31,"start_column":24,"last_line":31,"last_column":24,"length":1,"line":31,"column":24}},{"severity":"convention","message":"Indent `)` to 
column 6 (not 0)","cop_name":"Layout/ClosingParenthesisIndentation","corrected":true,"correctable":true,"location":{"start_line":32,"start_column":1,"last_line":32,"last_column
<<<OUTPUT ENDS>>>                                                                                                                                                               
(finished - exit code 0) ['/bin/zsh', '-c', '''standardrb'' --config ''/Users/rohrer/c/bn/mrclean/.standard.yml'' --fix --force-exclusion --stdin ''/Users/rohrer/c/bn/mrclean/l
ib/faraday_middleware/sign_body.rb'' < ''/var/folders/q9/dp048sqn3gx_qf03ccn85r100000gn/T/vWxRZht/5/sign_body.rb''']
  • It would help if you could simplify your configuration and reduced it to a minimum configuration that lead to the problem. It would also clarify if you could provide the rust file for which you expect a fix and tell us which fix you expect. A screenshot could you also help to understand what you experience. May 28 at 8:43
  • Use the plugin's issue tracker.
    – romainl
    May 28 at 10:07


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.