Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Exec csslint from project root to pick up project .csslintrc #79

Merged
merged 4 commits into from
Feb 14, 2016

Conversation

clamey
Copy link
Contributor

@clamey clamey commented Feb 10, 2016

This is an attempt to fix #73

@Arcanemagus
Copy link
Member

Needs to handle files not in a project and then it should be good 😉.

cwd = path.dirname(textEditor.getPath())
helpers.execNode(exec, parameters, {stdin: text, cwd: cwd}).then (output) ->
paths = atom.project.relativizePath(filePath)
helpers.execNode(exec, parameters, {stdin: text, cwd: paths.projectPath}).then (output) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Path.dirname(filePath), that way the file won't need to be in a project and csslint will also find it's config because presumably like every other linter it keeps searching for config until drive root

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, just read the issue comments, csslint is weird

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird and broken in so many ways, but people still use it even though there are better alternatives out there 😛.

@clamey
Copy link
Contributor Author

clamey commented Feb 10, 2016

I don't know much about Atom (and even less about its internals) - I guess in the case of no project it should exec in the cwd of the file?

Also, how do I run the tests in this project?

@Arcanemagus
Copy link
Member

apm test would run the tests.

If there is no project I would just keep the current behavior of running in the directory of the file.

@clamey
Copy link
Contributor Author

clamey commented Feb 10, 2016

ok - cool, thanks - latest commit on this branch falls back to existing behavior.

@Arcanemagus
Copy link
Member

Looks like you indented the line too far 😛.

@Arcanemagus
Copy link
Member

Whoops, looks like it didn't notify me of your updated commit, merging and pushing out a release now, thanks again!

Arcanemagus added a commit that referenced this pull request Feb 14, 2016
Exec csslint from project root to pick up project .csslintrc
@Arcanemagus Arcanemagus merged commit 2f92cfb into AtomLinter:master Feb 14, 2016
@steelbrain
Copy link
Contributor

Thanks @clamey

@Arcanemagus
Copy link
Member

Published in v1.3.0.

@clamey
Copy link
Contributor Author

clamey commented Feb 14, 2016

Sorry! Didn't know the process - thanks!

On Feb 13, 2016, at 5:50 PM, Landon Abney [email protected] wrote:

Whoops, looks like it didn't notify me of your updated commit, merging and pushing out a release now, thanks again!


Reply to this email directly or view it on GitHub.

@Arcanemagus
Copy link
Member

Not your fault, I should have been watching for the commit 😉.

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

Successfully merging this pull request may close these issues.

Does not support .csslintrc?
3 participants