dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.51k stars 1.43k forks source link

Incorrect spacing on gcc asm command. #4791

Open jonnicholson01 opened 3 months ago

jonnicholson01 commented 3 months ago

Information

Line 12 of asm/gcc.vim is incorrect:

You can see the error in ALEInfo as "-o /dev/null-iquote".

VIM version

Latest version as shown in git.

Operating System: Debian Bookworm.

What went wrong

When editing an asm file I get spurious errors.

:ALEInfo

Current Filetype: asm Available Linters: ['gcc', 'llvm_mc'] Enabled Linters: ['gcc'] Ignored Linters: [] Suggested Fixers: 'remove_trailing_lines' - Remove all blank lines at the end of a file. 'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.

Linter Variables: " Press Space to read :help for a setting let g:ale_asm_gcc_executable = 'gcc' let b:ale_asm_gcc_executable = '/usr/bin/avr-gcc' let g:ale_asm_gcc_options = '-Wall' let b:ale_asm_gcc_options = '-c -g -O -x assembler -DF_CPU=16000000UL -mmcu=atmega328p -isystem /usr/lib/avr/include -isystem /usr/lib/avr/include/avr -o /dev/null -iquote /asm_test/src/src/asm -Wa,-L' let g:ale_asm_llvm_mc_executable = 'llvm-mc' let g:ale_asm_llvm_mc_options = ''

Global Variables: " Press Space to read :help for a setting 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 = 'auto' 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 b:ale_enabled = 1 let g:ale_fix_on_save = 1 let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace']} let g:ale_history_enabled = 1 let g:ale_info_default_mode = 'preview' let g:ale_history_log_output = 1 let g:ale_keep_list_window_open = 0 let g:ale_lint_delay = 200 let b: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 = 'never' let g:ale_linter_aliases = {} let g:ale_linters = {} let b:ale_linters = ['gcc'] let g:ale_linters_explicit = 0 let g:ale_linters_ignore = {} let g:ale_list_vertical = 0 let g:ale_list_window_size = 10 let g:ale_loclist_msg_format = '%code: %%s' let g:ale_max_buffer_history_size = 20 let g:ale_max_signs = -1 let g:ale_maximum_file_size = v:null let g:ale_open_list = 0 let g:ale_pattern_options = v:null let g:ale_pattern_options_enabled = v:null let g:ale_root = {} let g:ale_set_balloons = 1 let g:ale_set_highlights = 1 let g:ale_set_loclist = 1 let g:ale_set_quickfix = 0 let g:ale_set_signs = 1 let g:ale_sign_column_always = 1 let g:ale_sign_error = 'E' let g:ale_sign_info = 'I' let g:ale_sign_offset = 1000000 let g:ale_sign_style_error = 'E' let g:ale_sign_style_warning = 'W' let g:ale_sign_warning = 'W' let g:ale_sign_highlight_linenrs = 0 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 = 'all' let g:ale_warn_about_trailing_blank_lines = 1 let g:ale_warn_about_trailing_whitespace = 1

Command History:

(executable check - success) /usr/bin/avr-gcc (finished - exit code 1) ['/bin/bash', '-c', '''/usr/bin/avr-gcc'' -x assembler -o /dev/null-iquote ''/ext/data/xen-dev/chiller_control/CC.c/asm_test/src/src/asm'' -c -g -O -x assembler -DF_CPU=16000000UL -mmcu=atmega328p -isystem /usr/lib/avr/include -isystem /usr/lib/avr/include/avr -o /dev/null -iquote /ext/data/zen-dev/chillder_control/CC.c/asm_test/src/src/asm -Wa,-L - < ''/tmp/vAaLrV8/0/aes.S''']

<<>> avr-gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files compilation terminated. <<>>

nospam2998 commented 2 weeks ago

My bet is on that quite few people reading these issues have a matching embedded development setup. In case you've patched your local install @jonnicholson01 and verified it to work, maybe you would wish to submit a pull request? (Sure the description seems clear enough, but few people dare pushing commits without testing them. A typo or similar is always far too easy to make.)