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

With --json, --grad should not accept extra argument #98

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 9 additions & 7 deletions app/cli.f90
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,16 @@
config%wrap = .false.
case("--grad")
config%grad = .true.
iarg = iarg + 1
call list%get(iarg, arg)
if (allocated(arg)) then
if (arg(1:1) == "-") then
iarg = iarg - 1
cycle
if (.not.config%json) then
iarg = iarg + 1

Check warning on line 226 in app/cli.f90

View check run for this annotation

Codecov / codecov/patch

app/cli.f90#L226

Added line #L226 was not covered by tests
call list%get(iarg, arg)
if (allocated(arg)) then
if (arg(1:1) == "-") then
iarg = iarg - 1
cycle

Check warning on line 231 in app/cli.f90

View check run for this annotation

Codecov / codecov/patch

app/cli.f90#L230-L231

Added lines #L230 - L231 were not covered by tests
end if
call move_alloc(arg, config%grad_output)
end if
call move_alloc(arg, config%grad_output)
end if
case("--atm")
config%inp%s9 = 1.0_wp
Expand Down
Loading