dense-analysis / dense-analysis/ale

Javac Linter Not Picking up on Spring Imports or Annotations

Open
#1,280 5 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 27 2017 10:05:25)
macOS version

**Operating System**
MacOS High Sierra

### :ALEInfo

Current Filetype:
Available Linters: []
Enabled Linters: []
Linter Variables:
Global Variables:
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_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'javascript': ['eslint'], 'python': ['autopep8']}
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_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {'java': ['javac'], 'python': ['mypy']}
let g:ale_open_list = 0
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 = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:

## What went wrong
ALE with javac picks up all imports and annotations except for things relating to the Spring framework. For example:
```
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
```
these imports result in the error "error: package org.springframework.XXX.YYY does not exist"

An example of the spring annotations not working are:
```
@Component
```
This results in the error: "error: cannot find symbol: Component"

## Reproducing the bug

Steps for repeating the bug:

1. Turn on javac linting
2. Open any Gradle Spring boot project to a file that has Spring imports and/or annotations

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.