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

Commit b17ce0b

Browse files
committed
added feature to show missing reference
fixed tests
1 parent 027775f commit b17ce0b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/julia-server.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function generate_messages( fname::AbstractString, code::AbstractString, env::Ab
301301
code = "E000"
302302
severity = "error"
303303
else
304-
msg = "Missing reference"
304+
msg = "Missing reference: '$(CSTParser.valof(x))'"
305305
code = "W000"
306306
severity = "warning"
307307
end

spec/linter-julia-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('The Julia StaticLint.jl provider for Linter', () => {
2121
});
2222

2323
it('checks a file with syntax error and reports the correct message', async () => {
24-
const excerpt = 'Missing reference';
24+
const excerpt = 'Missing reference: \'question\'';
2525
// very first call - it needs to install packages plus build the server
2626
const editorbootstrap = await atom.workspace.open(badFile);
2727
await lint(editorbootstrap);
@@ -31,10 +31,10 @@ describe('The Julia StaticLint.jl provider for Linter', () => {
3131
const messages = await lint(editor);
3232

3333
expect(messages.length).toBe(1);
34-
expect(messages[0].severity).toBe('error');
34+
expect(messages[0].severity).toBe('warning');
3535
expect(messages[0].excerpt).toBe(excerpt);
3636
expect(messages[0].location.file).toBe(badFile);
37-
expect(messages[0].location.position).toEqual([[1, 11], [1, 18]]);
37+
expect(messages[0].location.position).toEqual([[1, 11], [1, 19]]);
3838
});
3939

4040
it('finds nothing wrong with a valid file', async () => {

0 commit comments

Comments
 (0)