atom-ide-ui icon indicating copy to clipboard operation
atom-ide-ui copied to clipboard

Only show lint errors on save?

Open saadq opened this issue 8 years ago • 2 comments

Description

I have the linter package disabled, and have the atom-ide-ui package installed along with linter-js-standard. From what I understand, the linter-* packages are compatible with atom-ide-ui, however the errors from the linter-js-standard always show on code change instead of waiting for me to save the file. When using the old linter package, it had an option that allowed you to customize this behavior:

screen shot 2017-10-04 at 5 44 01 pm

However, I don't believe atom-ide-ui allows you to configure this (except for code formatting).

Expected Behavior

atom-ide-ui should give you an option to allow errors from linter-* packages to only show on save.

Actual Behavior

Errors from linter-* packages always show on change.

Versions

  • Atom: 1.20.1
  • Client OS: macOS Sierra 10.12.6
  • atom-ide-ui: 0.4.0

Additional Details

  • Installed packages (apm ls --installed): Gist

saadq avatar Oct 04 '17 21:10 saadq

This would be a great PR candidate! It'd just be a matter of adding a setting and using it here: https://github.com/facebook-atom/atom-ide-ui/blob/master/modules/atom-ide-ui/pkg/atom-ide-diagnostics/lib/services/LinterAdapter.js#L218

Bonus points for making it reactive by hooking it up to the observable.

hansonw avatar Oct 04 '17 22:10 hansonw

Something to look out for when implementing this:

When triggering a request for diagnostics is disabled on changes, TextBuffer::onDidReload should likely be added as a source of triggers for diagnostics to catch tools updating documents on save.

See https://github.com/steelbrain/linter/issues/1550 for an example situation like this.

Arcanemagus avatar Oct 06 '17 18:10 Arcanemagus