set_watch_defaults Subroutine

public subroutine set_watch_defaults(w)

Apply built-in defaults to watcher options.

This routine sets conservative defaults intended to work well for most projects, and ensures that list fields are always allocated (possibly with size zero).

Arguments

Type IntentOptional Attributes Name
type(watch_opts_t), intent(inout) :: w

Called by

proc~~set_watch_defaults~~CalledByGraph proc~set_watch_defaults set_watch_defaults proc~parse_cli parse_cli proc~parse_cli->proc~set_watch_defaults proc~parse_cli_config parse_cli_config proc~parse_cli_config->proc~parse_cli

Source Code

   subroutine set_watch_defaults(w)
      type(watch_opts_t), intent(inout) :: w
      w%verbosity = 0
      w%debug = .false.
      w%poll = 0.5
      w%debounce = 0.2
      w%rescan = 0.0
      w%run_on_start = .true.
      w%print_files_once = .false.
      w%silent_fpm = .false.
      w%watch_deps = .false.
      w%low_cpu = .false.
      w%once = .false.
      if (.not. allocated(w%ignore)) allocate(w%ignore(0))
      if (.not. allocated(w%include)) allocate(w%include(0))
      if (.not. allocated(w%enabled_features)) allocate(w%enabled_features(0))
   end subroutine set_watch_defaults