github.com/dolthub/dolt/go@v0.40.5-0.20240520175717-68db7794bea6/utils/escape-analysis/escape-analysis.sh (about) 1 #!/bin/bash 2 3 # This script is intended for usage on Unix-based systems. 4 # For Windows users, please use the .bat file instead. 5 6 LOGLEVEL=1 7 8 # Compiles "$1" (golang pkg) with escape-analysis logging 9 # -m turns on logging with level=$LOGLEVEL 10 # -N disables optimizations 11 # -l disables inlining 12 # 13 # To configure this script as a Goland annotation generator, 14 # add a File Watcher (Preferences > Tools > File Watchers). 15 # See "goland-file-watcher-config.png" for config info. 16 # 17 go build -gcflags="-m=$LOGLEVEL -N -l" "$1" 2>&1 >/dev/null \ 18 | sed '/does not escape/d' \ 19 | sort | uniq