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

Implement atom.services based linter v2 api #387

Closed
5 tasks
park9140 opened this issue Jan 24, 2015 · 9 comments
Closed
5 tasks

Implement atom.services based linter v2 api #387

park9140 opened this issue Jan 24, 2015 · 9 comments

Comments

@park9140
Copy link

V 2.0 api spec

  • linter packages provide a 'linter' service as per Make services API public atom/atom#5165
    • linter service defines the following api on a simple object
      • lint(selectedSubstringToBeLinted, sourceFileName) returns promise for an array of 'lintError's or just the array if done sync
      • selector for the scopes which we should lint (will allow us to lint subsections of files)
    • lintError
      • range? atom range object defining the range to which the error applies optional if only point provided
      • point? atom point [row, col] of the error if a linter can't find the range this will be expanded based on the local scope at that point
      • message
      • level error level
  • break current core linter out into separate support library
    • multiple base options
      • executableLinter (provides support for executing on the command line
      • nodeExecutable (uses BufferedNodeProcess)
    • make base linter classes support the new linter interface
    • base linter classes support creation and management of temp files rather than core linter project
  • provide example linter project demonstrating linter api
  • provide spec/documentation
  • support linter themes, ideally provide a styleguide for theme builders to verify their theme against.
@park9140
Copy link
Author

park9140 commented Feb 5, 2015

As per #411 we should consider including documenting a theme api as part of this process.

@park9140
Copy link
Author

park9140 commented Feb 5, 2015

@dmnd, @iam4x, @hd-deman, I updated this now that the services api is released. I'm probably going to start building this in a week or two. I'd love your ideas before I start.

@iam4x
Copy link
Contributor

iam4x commented Feb 17, 2015

Wasn't active on atom for a long time, just checked the atom/atom#5165 it looks awesome!

I let you start, and will try to find the time for a little help next week :)

@hd-deman
Copy link
Contributor

@dmnd what you think about this?

@dmnd
Copy link

dmnd commented Feb 18, 2015

Moving to the new services API sounds pretty good to me.

lint(selectedSubstringToBeLinted, sourceFileName)

In #282 we discussed linters that lint the actual file in the filesystem instead of a temporary copy. Maybe you could have two separate methods lintFile and lintString instead of combining both of these into one method.

@dmnd
Copy link

dmnd commented Feb 18, 2015

Also, I wonder if @bolinfest has opinions about this

@bolinfest
Copy link

I was playing around with this in #432, but I'm not happy with what's there yet.

@abe33
Copy link

abe33 commented Mar 2, 2015

I'm not sure if I should comment on this one or on #432.

I was wondering if the linter could also provides, through a service, an access to the linter defined for an editor. I was about to start working on a linter plugin for the minimap and I was struggling to find how to access and be notified of the errors/warning raised by a linter so that I can display them in the minimap.
Looking a the code of the LinterView there's no event available for when warning/errors are found by the composed linter. Maybe the first step is to implement such events, then exposing them through a service, like an observeLinters method that receive a callback called for every existing and future linters view.

@steelbrain
Copy link
Owner

Closing this issue as It was replaced by #546
Future visitors might want to checkout https://github.com/AtomLinter/linter-plus

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

No branches or pull requests

7 participants