Skip to content
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

import aliases generate unused error regardless of being used. #215

Closed
ta3pks opened this issue Feb 5, 2020 · 5 comments
Closed

import aliases generate unused error regardless of being used. #215

ta3pks opened this issue Feb 5, 2020 · 5 comments

Comments

@ta3pks
Copy link

ta3pks commented Feb 5, 2020

When you import Something.Something as Something my ide always produces an error saying Something is unused
image
image

Expected Behavior

No warnings produced

Steps to Reproduce (for bugs)

  1. install Ale plugin for neovim
  2. set linter back-end to elm_ls :let b:ale_linters = ['elm_ls']<cr>
    3.enable Ale if disabled :ALEEnable
    4.run the linter :ALELint

Context

I jump errors using various keybindings one of which is used to jump to the first error or warning and this issue is a huge productivity problem, in this case, reporting a false warning.

Your Environment

  • Version used:1.5.0
  • Editor used:neovim
  • Environment name and version (e.g. node.js 5.4): node.js v12.14.1
  • Operating System and version:Pop!_OS 19.10
@razzeee
Copy link
Member

razzeee commented Feb 6, 2020

These are generated by elm-analyze, can you run that tool normally and check if you get the same output?

@ta3pks
Copy link
Author

ta3pks commented Feb 6, 2020

Yes, elm-analyse definitely reports that one
image

@razzeee
Copy link
Member

razzeee commented Feb 6, 2020

Are you sure your using it? I would be very surprised, if you were the first one to get this error. I think the code has been unchanged for quiet some time. Anyway, you will need to raise that problem with elm-analyze then https://github.com/stil4m/elm-analyse

I'll close this for now.

@razzeee razzeee closed this as completed Feb 6, 2020
@ta3pks
Copy link
Author

ta3pks commented Feb 6, 2020

I did an npm install -g elm-analyse then ran elm-analyse on my project root.
Is there anything else to it ?

@razzeee
Copy link
Member

razzeee commented Feb 6, 2020

My question was, if your sure your using Api in your file? If you remove as Api from import Api.Api as Api, does your code still compile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants