AtomLinter / linter-codeclimate

An Atom Linter plugin for the Code Climate CLI
http://github.com/codeclimate/codeclimate
MIT License
10 stars 5 forks source link

Object.dirname is deprecated. #49

Closed blimmer closed 7 years ago

blimmer commented 7 years ago

Argument to path.dirname must be a string

Object.dirname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:9:10)
Object.lint (/Users/blimmer/.atom/packages/linter-codeclimate/lib/linter-codeclimate.coffee:113:29)
promises.push.Promise.then._this.emitter.emit.linter (/Users/blimmer/.atom/packages/linter/lib/linter-registry.js:95:28)
<unknown> (/Users/blimmer/.atom/packages/linter/lib/linter-registry.js:94:25)
Set.forEach (native)
LinterRegistry.lint (/Users/blimmer/.atom/packages/linter/lib/linter-registry.js:92:20)
maxjacobson commented 7 years ago

Hi @blimmer thanks for the issue. I'm trying to reproduce, but not currently seeing that output anywhere. Will you help show me where to look?

blimmer commented 7 years ago

Definitely - I think the first step will be to make sure you're up to date on Atom. I'm seeing this on version 1.13.0.

Then, it's in the bottom right of my editor:

maxjacobson commented 7 years ago

@blimmer hm, still not seeing it:

screen shot 2017-01-16 at 11 50 10 am

I'm using:

blimmer commented 7 years ago

Ah, upon looking at my atom deps, I bet it's this package that's doing it.

maxjacobson commented 7 years ago

@blimmer oh interesting. It looks like this one is on by default, because I seem to be running that as well (and still no deprecation output for me)

blimmer commented 7 years ago

hmm, not sure. all of my versions exactly match yours.

Arcanemagus commented 7 years ago

I'm betting that this is unable to find a configuration file for you @blimmer, which is leading to a null being sent to Path.dirname here. This should probably use the directory of the current file if a configuration path isn't able to be found.

blimmer commented 7 years ago

@Arcanemagus that's exactly right. I see the deprecation when I'm working in repositories without a .codeclimate.yml file and don't when the file is present. thanks for the pointer - it was weird we couldn't repro it in the same env.

Arcanemagus commented 7 years ago

Just looked over this again, I'm pretty sure I unintentionally fixed this in #48. 😛

Once that gets released here in a few minutes please double check to make sure it works properly.