-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use DiagnosticTag.Unnecessary for validations that point out unnecessary things #1345
Labels
Milestone
Comments
martinlippert
added
type: enhancement
for: vscode
something that is specific for VSCode
theme: validation
labels
Sep 5, 2024
About
Do you mean about: From @GetMapping(path={"/ciencias/{id}","/ciencias/{id}.html"})
String findOneById(Model model, @PathVariable(name="id") Integer id) {
model.addAttribute("ciencia", cienciaService.findById(id));
return "ciencia/findOne";
} To @GetMapping(path={"/ciencias/{id}","/ciencias/{id}.html"})
String findOneById(Model model, @PathVariable Integer id) {
model.addAttribute("ciencia", cienciaService.findById(id));
return "ciencia/findOne";
} Therefore from
If yes, it applies for From @GetMapping(path={"/ciencia","/ciencia.html"})
String findOneById(Model model, @RequestParam(name="id") Integer id) {
model.addAttribute("ciencia", cienciaService.findById(id));
return "ciencia/findOne";
} To @GetMapping(path={"/ciencia","/ciencia.html"})
String findOneById(Model model, @RequestParam Integer id) {
model.addAttribute("ciencia", cienciaService.findById(id));
return "ciencia/findOne";
} But here is tricky because the URL is unknown until runtime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
We have diagnostics in place that point out unnecessary things:
@Autowired
annotation on constructors@PathVariable
annotation when the name matches the parameter name(maybe more?)
We should include the DiagnosticTag.Unnecessary in the resulting diagnostic marker. It allows the client to render the part in the editor faded out.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag
(Whether this works in Eclipse would be an additional thing to verify)
The text was updated successfully, but these errors were encountered: