question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`elm-analyse.json` is getting ignored

See original GitHub issue

I haven’t been able to fully track down why, but settings in elm-analyse.json are getting ignored. As an example, if you have:

{
    "checks": {
        "ImportAll": false
    },
}

elm-ls still reports ImportAll warnings.

From my digging, it looks like the port that loads elm-analyse.json is getting initialized correctly: From file-loading-ports to context.

I haven’t poked the internals of elm-analyse to understand why it’s ignoring them.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
antewcommented, May 29, 2019

It looks like there are two bugs in how the elm-analyse.json file is handled.

  1. I inadvertently introduced a timing bug in elm-analyse, if the first file change event happens in the language server before elm-analyse has loaded the configuration file it will skip the state where it is listening for the configuration and go with the default.
  2. It would always try to load the configuration relative to the current working directory rather than the directory where elm.json is.

I’m still debating how to fix them, for elm-analyse.json I am leaning toward having it look up through parent directories so that you have the option of setting global configuration in ~/elm-analyse.json.

For the timing bug the fix is either going to be passing in the configuration as a flag, or ignoring the file change messages until everything has loaded, I am leaning toward the flag approach at the moment because it seems cleaner and would make it easier to add Elm Analyse settings panes and whatnot later on.

I should be able to get in a PR for it tomorrow night.

0reactions
razzeeecommented, Jun 2, 2019

This should be addressed by the PR linked above. Closing for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Suggestion] Allow disabling analytics rules and ...
You can use elm-analyse.json to disable rules and ignore directories . See their documentation (yes, we also need to have that on our...
Read more >
ElmLS 2.3.0 and VSCode Client 2.3.0 are out - Elm Discourse
If you have been using elm-tooling.json for entrypoints only, ... “Add type annotation” can now be enabled/disabled via elm-analyse.json and ...
Read more >
tsconfig.json is apparently being ignored? - Stack Overflow
When you run tsc filename.ts to compile specified files, the tsconfig.json will be ignored. Please refer this issuse.
Read more >
elm-review v2! - jfmengels' blog
New review capabilities! Project rules! Reporting errors for elm.json; Reading the dependencies' docs.json file; Visiting the README ...
Read more >
elm - Visual Studio Marketplace
Elm-analyse is a tool that allows you to analyse your Elm code, identify deficiencies and apply best practices. The integration enables vscode ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found