Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automated format #169

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: format-check

on:
push:
branches:
- 'master'
- 'release-'
tags: '*'
pull_request:

jobs:
Expand All @@ -29,14 +24,9 @@ jobs:
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(".", verbose=true)'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
- uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.DOCUMENTER_KEY }}
tool_name: JuliaFormatter
fail_on_error: true
filter_mode: added
2 changes: 1 addition & 1 deletion src/krylov_phiv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end
function get_cache(C::ExpvCache, m::Int)
m^2 > length(C.mem) && resize!(C, m) # resize the cache if needed
reshape(@view(C.mem[1:(m^2)]), m, m)
reshape(@view(C.mem[1:(m^2)]), m,m)

Check warning on line 15 in src/krylov_phiv.jl

View check run for this annotation

Codecov / codecov/patch

src/krylov_phiv.jl#L15

Added line #L15 was not covered by tests
end

############################
Expand Down
Loading