mybuddymichael / linter-elm-make

Lint your Elm files in Atom with elm-make
MIT License
32 stars 12 forks source link

Fix timeout option #149

Closed MethodGrab closed 7 years ago

MethodGrab commented 7 years ago

The previous implementation (#148) used the 10 second default value if you specified a value of 0. This PR fixes the issue and allows you to specify a value of 0.

Although one thing I have noticed; if you set the value of timeout to 0 (zero) in the settings view, while Atom does store the 0 correctly (atom.config.get('linter-elm-make.timeout') does equal 0), it doesnt appear in the settings view. It just shows the 'default' placeholder. This is probably a bug in atom/settings-view.

View when value is set to 0: image

I've reported the zero value bug here: https://github.com/atom/settings-view/issues/985

halohalospecial commented 7 years ago

Hi @MethodGrab, I think the problem is with the config type, which should be 'number'.

  timeout: {
    title: 'Timeout',
    description: 'Kill the linter process if it takes longer than this (in seconds) (`0` = disabled)',
    type: 'integer',
    default: 10,
    order: 9
  }
anagrius commented 7 years ago

This may be related to: #150

MethodGrab commented 7 years ago

You're correct, it should be a number. I've pushed a fix for that. However, for me (Atom v1.19.4 / settings-view v0.250.0) it still shows the timeout placeholder if I set the value to 0 then reload the editor (I think thats fixed in a newer version of settings-view though).

halohalospecial commented 7 years ago

Thanks, @MethodGrab!