Some checks failed
		
		
	
	Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
				
			Detach Plugins / check (GitHub.vim) (push) Has been cancelled
				
			Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
				
			Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
				
			Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
				
			Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
				
			Detach Plugins / check (git.vim) (push) Has been cancelled
				
			Detach Plugins / check (iedit.vim) (push) Has been cancelled
				
			Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
				
			Detach Plugins / check (vim-chat) (push) Has been cancelled
				
			Detach Plugins / check (vim-cheat) (push) Has been cancelled
				
			Detach Plugins / check (vim-todo) (push) Has been cancelled
				
			Detach Plugins / check (xmake.vim) (push) Has been cancelled
				
			test / Linux (nvim, nightly) (push) Has been cancelled
				
			test / Linux (nvim, v0.3.8) (push) Has been cancelled
				
			test / Linux (nvim, v0.4.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.4.2) (push) Has been cancelled
				
			test / Linux (nvim, v0.4.3) (push) Has been cancelled
				
			test / Linux (nvim, v0.4.4) (push) Has been cancelled
				
			test / Linux (nvim, v0.5.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.5.1) (push) Has been cancelled
				
			test / Linux (nvim, v0.6.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.6.1) (push) Has been cancelled
				
			test / Linux (nvim, v0.7.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.7.2) (push) Has been cancelled
				
			test / Linux (nvim, v0.8.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.8.1) (push) Has been cancelled
				
			test / Linux (nvim, v0.8.2) (push) Has been cancelled
				
			test / Linux (nvim, v0.8.3) (push) Has been cancelled
				
			test / Linux (nvim, v0.9.0) (push) Has been cancelled
				
			test / Linux (nvim, v0.9.1) (push) Has been cancelled
				
			test / Linux (true, vim, v7.4.052) (push) Has been cancelled
				
			test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
				
			test / Linux (true, vim, v7.4.629) (push) Has been cancelled
				
			test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
				
			test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
				
			test / Linux (vim, nightly) (push) Has been cancelled
				
			test / Linux (vim, v8.0.0184) (push) Has been cancelled
				
			test / Linux (vim, v8.0.1453) (push) Has been cancelled
				
			test / Linux (vim, v8.1.2269) (push) Has been cancelled
				
			test / Linux (vim, v8.2.2434) (push) Has been cancelled
				
			test / Linux (vim, v8.2.3995) (push) Has been cancelled
				
			test / Windows (nvim, nightly) (push) Has been cancelled
				
			test / Windows (nvim, v0.3.8) (push) Has been cancelled
				
			test / Windows (nvim, v0.4.2) (push) Has been cancelled
				
			test / Windows (nvim, v0.4.3) (push) Has been cancelled
				
			test / Windows (nvim, v0.4.4) (push) Has been cancelled
				
			test / Windows (nvim, v0.5.0) (push) Has been cancelled
				
			test / Windows (nvim, v0.5.1) (push) Has been cancelled
				
			test / Windows (nvim, v0.6.0) (push) Has been cancelled
				
			test / Windows (nvim, v0.6.1) (push) Has been cancelled
				
			test / Windows (nvim, v0.7.0) (push) Has been cancelled
				
			test / Windows (nvim, v0.7.2) (push) Has been cancelled
				
			test / Windows (nvim, v0.8.0) (push) Has been cancelled
				
			test / Windows (nvim, v0.8.1) (push) Has been cancelled
				
			test / Windows (nvim, v0.8.2) (push) Has been cancelled
				
			test / Windows (nvim, v0.8.3) (push) Has been cancelled
				
			test / Windows (nvim, v0.9.0) (push) Has been cancelled
				
			test / Windows (nvim, v0.9.1) (push) Has been cancelled
				
			test / Windows (vim, nightly) (push) Has been cancelled
				
			test / Windows (vim, v7.4.1185) (push) Has been cancelled
				
			test / Windows (vim, v7.4.1689) (push) Has been cancelled
				
			test / Windows (vim, v8.0.0027) (push) Has been cancelled
				
			test / Windows (vim, v8.0.1453) (push) Has been cancelled
				
			test / Windows (vim, v8.1.2269) (push) Has been cancelled
				
			test / Windows (vim, v8.2.2434) (push) Has been cancelled
				
			test / Windows (vim, v8.2.3995) (push) Has been cancelled
				
			docker / docker (push) Has been cancelled
				
			mirror / check (coding) (push) Has been cancelled
				
			mirror / check (gitee) (push) Has been cancelled
				
			mirror / check (gitlab) (push) Has been cancelled
				
			
		
			
				
	
	
		
			145 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			145 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/env bash
 | 
						||
 | 
						||
# This script adds color highlighting to the output from Neomake's Vader tests
 | 
						||
# (when called with "vader"), or to the file that gets written into according
 | 
						||
# to `neomake_logfile`.
 | 
						||
#
 | 
						||
# You can use the following to watch colored logs in a terminal window, after
 | 
						||
# having used `let g:neomake_logfile = '/tmp/neomake.log'` in Neovim/Vim:
 | 
						||
#
 | 
						||
#     tail -f /tmp/neomake.log | /path/to/neomake/contrib/highlight-log
 | 
						||
 | 
						||
bold="[1m"  # $(tput bold)
 | 
						||
bold_off="[22m"
 | 
						||
debug_color="[2m"  # $(tput dim), does not work in urxvt (although in infocmp/terminfo).
 | 
						||
debug_color_off="[22m"
 | 
						||
color_off="[39m"
 | 
						||
log_color="[33;1m"
 | 
						||
log_color_off="$bold_off$color_off"
 | 
						||
error_color="[31;1m"
 | 
						||
error_color_off="$bold_off$color_off"
 | 
						||
 | 
						||
# compact: display test headers, but not inner output for successful ones.
 | 
						||
compact=0
 | 
						||
 | 
						||
while [ $# -ne 0 ]; do
 | 
						||
    case $1 in
 | 
						||
    --compact) compact=1; shift ;;
 | 
						||
    --)  shift; break ;;
 | 
						||
    -?*) echo "Unknown option: $1" 1>&2; exit 64 ;;
 | 
						||
    *) break ;;
 | 
						||
    esac
 | 
						||
done
 | 
						||
 | 
						||
if [ "$1" = vader ]; then
 | 
						||
  # Match non-log lines (i.e. keep output from :Log, which should cause
 | 
						||
  # all messages from a case to be visible).
 | 
						||
  # This should also ignore empty lines and lines starting with a character
 | 
						||
  # (e.g. via NVIM_LOG_FILE:=/dev/stderr, and from :echom).
 | 
						||
  re_log_line='^(.*(  )?    )(> .*)$'
 | 
						||
  re_ignore_log_line='^.*(  )?    > \[(debug  |verbose|warning|error  )|((D|V|W|E) +\+[.0-9]+)\]'
 | 
						||
 | 
						||
  colorize() {
 | 
						||
    # Only colorize if stdout is connected to a tty (not with :!make).
 | 
						||
    if ! [ -t 1 ]; then
 | 
						||
      cat -
 | 
						||
      return
 | 
						||
    fi
 | 
						||
 | 
						||
    # sed: add coloring to Vader's output:
 | 
						||
    # 1. failures (includes pending) in red "(X)"
 | 
						||
    # 2. test case header in bold "(2/2)"
 | 
						||
    # 3. Neomake's error log messages
 | 
						||
    # 4. Neomake's debug log messages
 | 
						||
    # 5. non-Neomake log lines (e.g. from :Log)
 | 
						||
    sed -E -e 's/^(([^ ].*)? +)\([ [:digit:]]+\/[[:digit:]]+\) \[[ [:alpha:]]+\] \(X\).*/'"$error_color"'\0'"$error_color_off"'/' \
 | 
						||
      -e 's/^(([^ ].*)? +)(\([ [:digit:]]+\/[[:digit:]]+\))/\1'"$bold"'\3'"$bold_off"'/' \
 | 
						||
      -e 's/^ +> \[(error  |E \+[.[:digit:]]+)\]: .*/'"$bold"'\0'"$bold_off"'/' \
 | 
						||
      -e 's/^ +> \[(debug  |D \+[.[:digit:]]+)\]: .*/'"$debug_color"'\0'"$debug_color_off"'/' \
 | 
						||
      -e '/'"$re_ignore_log_line"'/! s/'"$re_log_line"'/\1'"$log_color"'\3'"$log_color_off"'/'
 | 
						||
  }
 | 
						||
 | 
						||
  if ((compact)); then
 | 
						||
    # Do not display output for successful tests (i.e. the log statements).
 | 
						||
    last_start_match=
 | 
						||
    # Match Vader header ("( 1/33) [EXECUTE] …"), but also if there is output
 | 
						||
    # from Vim, e.g. with ":colder".
 | 
						||
    re_vader_header='^([^ ].*)?\ +(\(\ *[0-9]+/[0-9]+\))'
 | 
						||
    filtering=0
 | 
						||
    finished_reading=0
 | 
						||
    stopped_filtering=0
 | 
						||
    while [ "$finished_reading" = 0 ]; do
 | 
						||
      if ! read -r; then
 | 
						||
        if [ -z "$REPLY" ]; then
 | 
						||
          break
 | 
						||
          finished_reading=1
 | 
						||
        fi
 | 
						||
      fi
 | 
						||
      if [[ "$REPLY" == *'Vader error:'* ]] || [[ "$REPLY" == 'Error'* ]] || [[ "$REPLY" == 'Traceback'* ]]; then
 | 
						||
        printf "\r" >&2
 | 
						||
        printf "[31m[1m%s[0m\n" "$REPLY"
 | 
						||
        continue
 | 
						||
      fi
 | 
						||
      if (( stopped_filtering )); then
 | 
						||
        echo "$REPLY"
 | 
						||
        continue
 | 
						||
      fi
 | 
						||
      if [[ "$REPLY" == *'Starting Vader:'* ]]; then
 | 
						||
        echo "$REPLY"
 | 
						||
      elif [[ "$REPLY" == '      Duration: '* ]]; then
 | 
						||
        echo "$REPLY"
 | 
						||
      elif [[ "$REPLY" == *'(X)'* ]]; then
 | 
						||
        # Should also match "(1/1) [EXECUTE] (X) Error: Vim(function):E126: Missing :endfunction" already.
 | 
						||
        if [[ -n "$filtered" ]]; then
 | 
						||
          echo "$filtered"
 | 
						||
        fi
 | 
						||
        echo "$REPLY"
 | 
						||
        filtered=
 | 
						||
        filtering=0
 | 
						||
      elif [[ "$REPLY" =~ $re_vader_header  ]]; then
 | 
						||
        filtering=1
 | 
						||
        if [[ ${BASH_REMATCH[2]} == "$last_start_match" ]]; then
 | 
						||
          filtered="$filtered"$'\n'"$REPLY"
 | 
						||
        else
 | 
						||
          echo "$REPLY"
 | 
						||
          filtered=
 | 
						||
        fi
 | 
						||
        last_start_match="${BASH_REMATCH[2]}"
 | 
						||
      elif [[ "$REPLY" == *'Success/Total: '* || "$REPLY" == '  Slowest tests:' ]]; then
 | 
						||
        echo "$REPLY"
 | 
						||
        filtering=0
 | 
						||
        filtered=
 | 
						||
        stopped_filtering=1
 | 
						||
      elif ! ((filtering)); then
 | 
						||
        echo "$REPLY"
 | 
						||
      elif [[ "$REPLY" =~ $re_log_line && ! "$REPLY" =~ $re_ignore_log_line ]]; then
 | 
						||
        if [[ "$REPLY" =~ '> SKIP:' ]]; then
 | 
						||
          echo "$REPLY"
 | 
						||
          continue
 | 
						||
        fi
 | 
						||
        if [[ -n "$filtered" ]]; then
 | 
						||
          echo "$filtered"
 | 
						||
        fi
 | 
						||
        echo "$REPLY"
 | 
						||
        filtered=
 | 
						||
        filtering=0
 | 
						||
      elif [[ -n "$filtered" ]]; then
 | 
						||
        filtered="$filtered"$'\n'"$REPLY"
 | 
						||
      else
 | 
						||
        filtered="$REPLY"
 | 
						||
      fi
 | 
						||
    done
 | 
						||
  else
 | 
						||
    cat -
 | 
						||
  fi | colorize
 | 
						||
 | 
						||
else
 | 
						||
  # Output from neomake_logfile.
 | 
						||
  error='^[:[:digit:]]\+ [[:digit:]]\+ \[E .*'
 | 
						||
  warn='^[:[:digit:]]\+ [[:digit:]]\+ \[W .*'
 | 
						||
  debug='^[:[:digit:]]\+ [[:digit:]]\+ \[D .*'
 | 
						||
  sed -e "s/$error/[31m[1m\0[0m/" \
 | 
						||
      -e "s/$warn/w:[33m\0[0m/" \
 | 
						||
      -e "s/$debug/$debug_color\\0$debug_color_off/"
 | 
						||
fi
 |