Skip to content

Commit 33e60e2

Browse files
authored
Merge branch 'master' into nothing
2 parents 81db96e + 6ab1bf4 commit 33e60e2

8 files changed

+19
-13
lines changed

.github/workflows/jlpkgbutler-butler-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: "Run Package Butler"
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- uses: davidanthoff/julia-pkgbutler@releases/v1
1919
with:
2020
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/jlpkgbutler-ci-master-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8']
15+
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9']
1616
julia-arch: [x64, x86]
1717
os: [ubuntu-latest, windows-latest, macOS-latest]
1818
exclude:
1919
- os: macOS-latest
2020
julia-arch: x86
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424
- uses: julia-actions/setup-julia@v1
2525
with:
2626
version: ${{ matrix.julia-version }}
@@ -32,7 +32,7 @@ jobs:
3232
env:
3333
PYTHON: ""
3434
- uses: julia-actions/julia-processcoverage@v1
35-
- uses: codecov/codecov-action@v2
35+
- uses: codecov/codecov-action@v3
3636
with:
3737
files: ./lcov.info
3838
flags: unittests

.github/workflows/jlpkgbutler-ci-pr-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8']
12+
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9']
1313
julia-arch: [x64, x86]
1414
os: [ubuntu-latest, windows-latest, macOS-latest]
1515
exclude:
1616
- os: macOS-latest
1717
julia-arch: x86
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- uses: julia-actions/setup-julia@v1
2222
with:
2323
version: ${{ matrix.julia-version }}
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
PYTHON: ""
3131
- uses: julia-actions/julia-processcoverage@v1
32-
- uses: codecov/codecov-action@v2
32+
- uses: codecov/codecov-action@v3
3333
with:
3434
files: ./lcov.info
3535
flags: unittests

.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
format:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- uses: julia-actions/julia-codeformat@releases/v1
1616
- name: Create Pull Request
1717
uses: peter-evans/create-pull-request@v3

.github/workflows/jlpkgbutler-docdeploy-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
docdeploy:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- uses: julia-actions/julia-buildpkg@v1
1818
env:
1919
PYTHON: ""

src/interface.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
function setup_server(env = dirname(SymbolServer.Pkg.Types.Context().env.project_file), depot = first(SymbolServer.Pkg.depots()), cache = joinpath(dirname(pathof(SymbolServer)), "..", "store"))
22
server = StaticLint.FileServer()
33
ssi = SymbolServerInstance(depot, cache)
4-
_, server.symbolserver = SymbolServer.getstore(ssi, env)
5-
server.symbol_extends = SymbolServer.collect_extended_methods(server.symbolserver)
4+
_, symbols = SymbolServer.getstore(ssi, env)
5+
extended_methods = SymbolServer.collect_extended_methods(symbols)
6+
server.external_env = ExternalEnv(symbols, extended_methods, Symbol[])
67
server
78
end
89

src/references.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ function resolve_getfield(x::EXPR, parent_type::EXPR, state::State)::Bool
203203
if CSTParser.defines_module(parent_type) && scopeof(parent_type) isa Scope
204204
resolved = resolve_ref(x, scopeof(parent_type), state)
205205
elseif CSTParser.defines_struct(parent_type)
206-
if scopehasbinding(scopeof(parent_type), valof(x))
207-
setref!(x, scopeof(parent_type).names[valof(x)])
206+
if scopehasbinding(scopeof(parent_type), valofid(x))
207+
setref!(x, scopeof(parent_type).names[valofid(x)])
208208
resolved = true
209209
end
210210
end

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,17 @@ f(arg) = arg
646646
name
647647
func
648648
func1
649+
struct AnyType
650+
var"anything"
651+
end
652+
anything(x::AnyType) = x.var"anything"
649653
""")
650654
StaticLint.collect_hints(cst, getenv(server.files[""], server))
651655
@test all(n in keys(cst.meta.scope.names) for n in ("name", "func"))
652656
@test StaticLint.hasref(cst[4])
653657
@test StaticLint.hasref(cst[5])
654658
@test StaticLint.hasref(cst[6])
659+
@test cst.args[8].args[2].args[1].args[2].args[1] in bindingof(cst.args[7].args[3].args[1]).refs
655660
end
656661
end
657662
end

0 commit comments

Comments
 (0)