<commit_before>" Sourced by ./setup.vader.
" Keeping this in a separate file is better for performance.

function! s:wait_for_jobs(filter)
  let max = 45
  while 1
    let jobs = copy(neomake#GetJobs())
    if len(a:filter)
      let jobs = filter(jobs, a:filter)
    endif
    if !len(jobs)
      break
    endif
    let max -= 1
    if max == 0
      for j in jobs
        call vader#log('Remaining job: '.string(neomake#utils#fix_self_ref(j)))
      endfor
      call neomake#CancelJobs(1)
      throw len(jobs).' jobs did not finish after 3s.'
    endif
    exe 'sleep' (max < 25 ? 100 : max < 35 ? 50 : 10).'m'
  endwhile
endfunction
command! NeomakeTestsWaitForFinishedJobs call s:wait_for_jobs("!get(v:val, 'finished')")
command! NeomakeTestsWaitForRemovedJobs call s:wait_for_jobs('')

function! s:wait_for_next_message()
  let max = 45
  let n = len(g:neomake_test_messages)
  while 1
    let max -= 1
    if max == 0
      throw 'No new message appeared after 3s.'
    endif
    exe 'sleep' (max < 25 ? 100 : max < 35 ? 50 : 10).'m'
    if len(g:neomake_test_messages) != n<commit_msg>tests: do not cancel jobs in s:wait_for_jobs<commit_after>" Sourced by ./setup.vader.
" Keeping this in a separate file is better for performance.

function! s:wait_for_jobs(filter)
  let max = 45
  while 1
    let jobs = copy(neomake#GetJobs())
    if len(a:filter)
      let jobs = filter(jobs, a:filter)
    endif
    if !len(jobs)
      break
    endif
    let max -= 1
    if max == 0
      for j in jobs
        call vader#log('Remaining job: '.string(neomake#utils#fix_self_ref(j)))
      endfor
      throw len(jobs).' jobs did not finish after 3s.'
    endif
    exe 'sleep' (max < 25 ? 100 : max < 35 ? 50 : 10).'m'
  endwhile
endfunction
command! NeomakeTestsWaitForFinishedJobs call s:wait_for_jobs("!get(v:val, 'finished')")
command! NeomakeTestsWaitForRemovedJobs call s:wait_for_jobs('')

function! s:wait_for_next_message()
  let max = 45
  let n = len(g:neomake_test_messages)
  while 1
    let max -= 1
    if max == 0
      throw 'No new message appeared after 3s.'
    endif
    exe 'sleep' (max < 25 ? 100 : max < 35 ? 50 : 10).'m'
    if len(g:neomake_test_messages) != n
{'fraction_non_alphanumeric': 0.11288848263254113, 'fraction_numerical': 0.03153564899451554, 'mean_word_length': 3.0313075506445673, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2722417', 'n_tokens_mistral': 872, 'n_tokens_neox': 774, 'n_words': 237}