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

Commit 7146385

Browse files
authored
Merge pull request #207 from AtomLinter/arcanemagus/range-to-position
Rename range to position
2 parents 61ee45a + d3854ae commit 7146385

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ export default {
166166
while (match !== null) {
167167
const line = Number.parseInt(match[1], 10) - 1;
168168
const column = Number.parseInt(match[2], 10);
169-
const range = generateRange(editor, line, column);
169+
const position = generateRange(editor, line, column);
170170
const message = {
171171
severity: determineSeverity(match[3]),
172172
excerpt: match[5],
173-
location: { file: filePath, range },
173+
location: { file: filePath, position },
174174
url: `http://pylint-messages.wikidot.com/messages:${match[4]}`,
175175
};
176176

spec/linter-pylint-spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ describe('The pylint provider for Linter', () => {
5252
expect(messages[0].severity).toBe('info');
5353
expect(messages[0].excerpt).toBe('C0111 Missing module docstring');
5454
expect(messages[0].location.file).toBe(badPath);
55-
expect(messages[0].location.range).toEqual([[0, 0], [0, 4]]);
55+
expect(messages[0].location.position).toEqual([[0, 0], [0, 4]]);
5656
expect(messages[0].url).toBe(`${wikiURLBase}C0111`);
5757

5858
expect(messages[1].severity).toBe('warning');
5959
expect(messages[1].excerpt).toBe('W0104 Statement seems to have no effect');
6060
expect(messages[1].location.file).toBe(badPath);
61-
expect(messages[1].location.range).toEqual([[0, 0], [0, 4]]);
61+
expect(messages[1].location.position).toEqual([[0, 0], [0, 4]]);
6262
expect(messages[1].url).toBe(`${wikiURLBase}W0104`);
6363

6464
expect(messages[2].severity).toBe('error');
6565
expect(messages[2].excerpt).toBe("E0602 Undefined variable 'asfd'");
6666
expect(messages[2].location.file).toBe(badPath);
67-
expect(messages[2].location.range).toEqual([[0, 0], [0, 4]]);
67+
expect(messages[2].location.position).toEqual([[0, 0], [0, 4]]);
6868
expect(messages[2].url).toBe(`${wikiURLBase}E0602`);
6969
}),
7070
),

0 commit comments

Comments
 (0)