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

Reference correct message property for file path #146

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

gluxon
Copy link
Contributor

@gluxon gluxon commented Jan 25, 2019

After commit 2391e38, I began receiving the following error in Atom:

Failed to run cargo
Path must be a string. Received undefined

This is because the following line of code joins the current directory path with message.file, which is undefined.

message.file = path.join curDir, message.file

Here message.file is undefined since the new linter message v2 object has the file path under message.location.file. See: https://steelbrain.me/linter/types/linter-message-v2.html

The constructMessage function of lib/mode.coffee follows this specification, but linter-rust.coffee looks for the path in a different place. This commit simply updates linter-rust.coffee to reference the correct property.

After commit 2391e38, I began receiving the following error in Atom:

    Failed to run cargo
    Path must be a string. Received undefined

This is because the following line of code joins the current directory
path with message.file, which is undefined.

    message.file = path.join curDir, message.file

Here message.file is undefined since the new linter message v2 object
has the file path under message.location.file. See:
https://steelbrain.me/linter/types/linter-message-v2.html

The constructMessage function of lib/mode.coffee follows this
specification, but linter-rust.coffee looks for the path in a different
place. This commit simply updates linter-rust.coffee to reference the
correct property.
Copy link
Member

@Arcanemagus Arcanemagus left a comment

Choose a reason for hiding this comment

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

Thanks for catching that!

@Arcanemagus Arcanemagus merged commit 9f11944 into AtomLinter:master Jan 25, 2019
@gluxon
Copy link
Contributor Author

gluxon commented Jan 25, 2019

That has to be the quickest I've ever had a merge request approved. You're awesome, thanks for maintaining this package!

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.

2 participants