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).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_opts_t), | intent(inout) | :: | w |
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