├── .gitignore ├── .travis.yml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── info.rkt ├── main.rkt ├── result-racket-repos.txt ├── result-racket.txt ├── scribblings └── racket-analysis.scrbl └── test.rkt /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | \#* 3 | .\#* 4 | .DS_Store 5 | compiled/ 6 | /doc/ 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | # Based on: https://github.com/greghendershott/travis-racket 4 | 5 | env: 6 | global: 7 | # Supply a global RACKET_DIR environment variable. This is where 8 | # Racket will be installed. A good idea is to use ~/racket because 9 | # that doesn't require sudo to install. 10 | - RACKET_DIR=~/racket 11 | matrix: 12 | # Supply at least one RACKET_VERSION environment variable. This is 13 | # used by the install-racket.sh script (run at before_install, 14 | # below) to select the version of Racket to download and install. 15 | # 16 | # Supply more than one RACKET_VERSION (as in the example below) to 17 | # create a Travis-CI build matrix to test against multiple Racket 18 | # versions. 19 | - RACKET_VERSION=6.12 20 | - RACKET_VERSION=7.0 21 | - RACKET_VERSION=7.1 22 | - RACKET_VERSION=7.2 23 | - RACKET_VERSION=HEAD 24 | 25 | matrix: 26 | allow_failures: 27 | # - env: RACKET_VERSION=HEAD 28 | fast_finish: true 29 | 30 | before_install: 31 | - git clone https://github.com/greghendershott/travis-racket.git ~/travis-racket 32 | - cat ~/travis-racket/install-racket.sh | bash # pipe to bash not sh! 33 | - export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us 34 | 35 | install: 36 | - raco pkg install --auto --name racket-analysis 37 | 38 | before_script: 39 | 40 | # Here supply steps such as raco make, raco test, etc. You can run 41 | # `raco pkg install --deps search-auto` to install any required 42 | # packages without it getting stuck on a confirmation prompt. 43 | script: 44 | - raco test -x -p racket-analysis 45 | 46 | after_success: 47 | - raco setup --check-pkg-deps --pkgs racket-analysis 48 | - raco pkg install --auto cover cover-coveralls 49 | - raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage . 50 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Copyright 2020 sorawee 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | racket-analysis 2 | 3 | MIT License 4 | 5 | Copyright (c) 2020 sorawee 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | racket-analysis 2 | =============== 3 | 4 | Run `racket main.rkt --help` for usage 5 | 6 | Example: 7 | 8 | ``` 9 | racket main.rkt --level error --level warning ~/git/racket 2> /dev/null 10 | ``` 11 | 12 | See `result-racket.txt` and `result-racket-repos.txt` for (example) issues in Racket repos. 13 | -------------------------------------------------------------------------------- /info.rkt: -------------------------------------------------------------------------------- 1 | #lang info 2 | (define collection "racket-analysis") 3 | (define deps '("base")) 4 | (define build-deps '("scribble-lib" "racket-doc" "rackunit-lib")) 5 | (define scribblings '(("scribblings/racket-analysis.scrbl" ()))) 6 | (define pkg-desc "Description Here") 7 | (define version "0.0") 8 | (define pkg-authors '(sorawee)) 9 | -------------------------------------------------------------------------------- /main.rkt: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | 3 | (require racket/cmdline 4 | racket/function 5 | racket/match 6 | racket/date 7 | racket/list 8 | racket/pretty 9 | racket/format 10 | racket/string 11 | syntax/parse 12 | syntax/parse/define 13 | drracket/check-syntax) 14 | 15 | ;; get-syntax :: path-string? -> (or/c #f syntax?) 16 | (define (get-syntax path) 17 | (parameterize ([read-accept-reader #t]) 18 | (with-handlers ([exn:fail? (const #f)]) 19 | (call-with-input-file* path 20 | (λ (p) 21 | (port-count-lines! p) 22 | (define result (read-syntax (object-name p) p)) 23 | (cond 24 | [(eof-object? result) #f] 25 | [else result])))))) 26 | 27 | ;; info/c = (list (listof identifier?) check-syntax-output?) 28 | 29 | ;; get-info :: syntax? -> (or/c #f info/c) 30 | (define (get-info stx) 31 | (define ns (make-base-namespace)) 32 | (define expanded-stx 33 | (with-handlers ([exn:fail? (const #f)]) 34 | (parameterize ([current-namespace ns]) 35 | (expand stx)))) 36 | (cond 37 | [expanded-stx 38 | (define source (syntax-source stx)) 39 | (define mapping (make-hash)) 40 | (let loop ([stx expanded-stx]) 41 | (define (check-property prop-key) 42 | (define props (and (syntax? stx) (syntax-property stx prop-key))) 43 | (when props (loop props))) 44 | (check-property 'disappeared-use) 45 | (check-property 'disappeared-binding) 46 | (check-property 'origin) 47 | (syntax-parse stx 48 | [(a . b) 49 | (loop #'a) 50 | (loop #'b)] 51 | [() (void)] 52 | [x:id 53 | #:when (equal? source (syntax-source #'x)) 54 | (hash-update! mapping 55 | (syntax-position #'x) 56 | (λ (old) (cons #'x old)) 57 | '())] 58 | [_ (void)])) 59 | (list (append* 60 | (for/list ([(k v) (in-hash mapping)]) 61 | (remove-duplicates v free-identifier=?))) 62 | ;; we can draw the arrow ourselves by walking the 63 | ;; fully expanded syntax but why reinventing the wheel? 64 | ;; let's just reuse whatever check-syntax gives us 65 | ;; 66 | ;; NOTE: currently we don't need this result yet, so make it #f 67 | ;; to speedup analysis 68 | #f 69 | #;(show-content expanded-stx 70 | #:fully-expanded? #t 71 | #:namespace ns))] 72 | [else #f])) 73 | 74 | (struct issue (level message stx) #:transparent) 75 | 76 | ;; member-by-position :: identifier? (listof identifier?) -> boolean? 77 | (define (member-by-position x ids) 78 | (for/or ([id (in-list ids)]) 79 | (equal? (syntax-position x) 80 | (syntax-position id)))) 81 | 82 | (struct analyzer (lv name proc)) 83 | 84 | (define-simple-macro (create-analyzer #:level lv #:name name body ...+) 85 | (analyzer 'lv 'name (let () body ...))) 86 | 87 | 88 | ;; analyze :: info/c -> (listof issue?) 89 | (define (analyze info stx) 90 | (match-define (list ids _check-syntax-out) info) 91 | 92 | (define analyzers 93 | (list 94 | (create-analyzer 95 | #:level warning #:name match:bind-empty-list 96 | (define match-ids (filter (λ (id) (free-identifier=? id #'match)) ids)) 97 | (syntax-parser 98 | [(-match _ _ ... [{~or {~datum null} {~datum empty}} _ ...+] _ ...) 99 | #:when (member-by-position #'-match match-ids) 100 | (list this-syntax)] 101 | [_ '()])) 102 | 103 | (create-analyzer 104 | #:level warning #:name case:quote 105 | (define case-ids (filter (λ (id) (free-identifier=? id #'case)) ids)) 106 | (syntax-parser 107 | [(-case _ _ ... [({~datum quote} _) _ ...+] _ ...) 108 | #:when (member-by-position #'-case case-ids) 109 | (list this-syntax)] 110 | [_ '()])) 111 | 112 | (create-analyzer 113 | #:level error #:name cond:invalid-else 114 | (define cond-ids (filter (λ (id) (free-identifier=? id #'cond)) ids)) 115 | (define else-ids (filter (λ (id) (free-identifier=? id #'else)) ids)) 116 | (syntax-parser 117 | [(-cond _ ... [{~and -else {~datum else}} _ ...+]) 118 | #:when (and (member-by-position #'-cond cond-ids) 119 | (not (member-by-position #'-else else-ids))) 120 | (list this-syntax)] 121 | [_ '()])) 122 | 123 | (create-analyzer 124 | #:level error #:name case:invalid-else 125 | (define case-ids (filter (λ (id) (free-identifier=? id #'case)) ids)) 126 | (define else-ids (filter (λ (id) (free-identifier=? id #'else)) ids)) 127 | (syntax-parser 128 | [(-case _ ... [{~and -else {~datum else}} _ ...+]) 129 | #:when (and (member-by-position #'-case case-ids) 130 | (not (member-by-position #'-else else-ids))) 131 | (list this-syntax)] 132 | [_ '()])) 133 | 134 | (create-analyzer 135 | #:level annoying #:name cond:no-else 136 | (define cond-ids (filter (λ (id) (free-identifier=? id #'cond)) ids)) 137 | (define else-ids (filter (λ (id) (free-identifier=? id #'else)) ids)) 138 | (syntax-parser 139 | [(-cond _ ... [-something _ ...]) 140 | #:when (and (member-by-position #'-cond cond-ids) 141 | (not (member-by-position #'-something else-ids))) 142 | (list this-syntax)] 143 | [_ '()])) 144 | 145 | (create-analyzer 146 | #:level error #:name match-like:bind-else 147 | (define match-like-ids 148 | (filter (λ (id) (or (free-identifier=? id #'match) 149 | (free-identifier=? id #'syntax-case) 150 | (free-identifier=? id #'syntax-parse) 151 | (free-identifier=? id #'syntax-parser) 152 | (free-identifier=? id #'define-syntax-parser))) ids)) 153 | (syntax-parser 154 | [(-match-like _ ... [{~datum else} _ ...+]) 155 | #:when (member-by-position #'-match-like match-like-ids) 156 | (list this-syntax)] 157 | [_ '()])))) 158 | 159 | (let loop ([stx stx]) 160 | (append* 161 | (syntax-parse stx 162 | [(a . b) (append (loop #'a) (loop #'b))] 163 | [_ '()]) 164 | (for/list ([the-analyzer (in-list analyzers)]) 165 | (match the-analyzer 166 | [(analyzer lv name proc) 167 | (cond 168 | [(and (or (null? (current-levels)) 169 | (member lv (current-levels))) 170 | (or (null? (current-analyzers)) 171 | (member name (current-analyzers)))) 172 | (for/list ([stx-fragment (in-list (proc stx))]) 173 | (issue lv name stx-fragment))] 174 | [else '()])] 175 | [_ 176 | ;; currently not supported 177 | '()]))))) 178 | 179 | (define (main path) 180 | (for ([f (in-directory path)] 181 | #:when (string-suffix? (~a f) ".rkt") 182 | ;; This directory alone takes like 10+ mins. Let's skip it. 183 | #:unless (string-contains? (~a f) "pkgs/racket-test/tests/racket/stress/") 184 | ;; Not interested in trash 185 | #:unless (string-contains? (~a f) "/.trash/")) 186 | (define stx (get-syntax f)) 187 | (when stx 188 | (define info (get-info stx)) 189 | (when info 190 | (when (current-log-file) 191 | (with-output-to-file (current-log-file) #:exists 'append 192 | (λ () (printf "[~a] ~a\n" (date->string (current-date) #t) f)))) 193 | (define results (analyze info stx)) 194 | (unless (null? results) 195 | (displayln "----------------------") 196 | (printf "[~a] Processing ~a\n" (date->string (current-date) #t) f) 197 | (for-each pretty-print results) 198 | (newline)))))) 199 | 200 | (define current-analyzers (make-parameter '())) 201 | (define current-levels (make-parameter '())) 202 | (define current-log-file (make-parameter #f)) 203 | 204 | (module+ main 205 | (define path 206 | (command-line 207 | #:multi 208 | [("--analyze") name 209 | "Analyzer name (default: every analyzer)" 210 | (current-analyzers (cons (string->symbol name) (current-analyzers)))] 211 | [("--level") level 212 | "Level (default: every level)" 213 | (current-levels (cons (string->symbol level) (current-levels)))] 214 | #:once-each 215 | [("--log-file") the-log-file 216 | "Logfile (default: none)" 217 | (current-log-file the-log-file)] 218 | #:args (path) 219 | path)) 220 | 221 | ;; make sure the file is created 222 | (when (current-log-file) 223 | (with-output-to-file (current-log-file) #:exists 'append 224 | (λ () (display "")))) 225 | 226 | (main path)) 227 | -------------------------------------------------------------------------------- /result-racket-repos.txt: -------------------------------------------------------------------------------- 1 | ---------------------- 2 | [Wednesday, August 26th, 2020 3:30:35am] Processing /Users/sorawee/git/racket-repos/July2020entries/scripts/defines.rkt 3 | (issue 4 | 'error 5 | 'syntax-case:bind-else 6 | #) 7 | (issue 8 | 'error 9 | 'match:bind-else 10 | #datum s) ((quasiquote (define (unquote head) unquote rst)) (list head (syntax-line s))) (else #f))>) 11 | 12 | ---------------------- 13 | [Wednesday, August 26th, 2020 3:30:43am] Processing /Users/sorawee/git/racket-repos/drracket/drracket/browser/external.rkt 14 | (issue 15 | 'error 16 | 'match:bind-else 17 | #) 18 | 19 | ---------------------- 20 | [Wednesday, August 26th, 2020 3:30:50am] Processing /Users/sorawee/git/racket-repos/drracket/drracket/drracket/private/frame.rkt 21 | (issue 22 | 'error 23 | 'match:bind-else 24 | #) 25 | 26 | ---------------------- 27 | [Wednesday, August 26th, 2020 3:31:07am] Processing /Users/sorawee/git/racket-repos/drracket/drracket/drracket/private/pict-snip.rkt 28 | (issue 29 | 'error 30 | 'match:bind-else 31 | #) 32 | 33 | ---------------------- 34 | [Wednesday, August 26th, 2020 3:31:11am] Processing /Users/sorawee/git/racket-repos/drracket/drracket/drracket/private/tool-contract-language.rkt 35 | (issue 36 | 'error 37 | 'syntax-case:bind-else 38 | #datum (syntax type)))) (andmap...>) 39 | 40 | ---------------------- 41 | [Wednesday, August 26th, 2020 3:31:30am] Processing /Users/sorawee/git/racket-repos/drracket/drracket/help/private/save-bug-report.rkt 42 | (issue 43 | 'error 44 | 'match:bind-else 45 | #) 46 | 47 | ---------------------- 48 | [Wednesday, August 26th, 2020 3:31:58am] Processing /Users/sorawee/git/racket-repos/drracket/drracket-tool-lib/drracket/private/standalone-module-browser.rkt 49 | (issue 50 | 'error 51 | 'syntax-case:bind-else 52 | #datum (syntax m-name)))) (else unknown-module-name))>) 53 | (issue 54 | 'error 55 | 'match:bind-else 56 | #) 57 | (issue 58 | 'error 59 | 'match:bind-else 60 | #) 61 | 62 | ---------------------- 63 | [Wednesday, August 26th, 2020 3:33:27am] Processing /Users/sorawee/git/racket-repos/racket-analysis/test.rkt 64 | (issue 65 | 'error 66 | 'cond:invalid-else 67 | #) 68 | (issue 69 | 'error 70 | 'cond:invalid-else 71 | #) 72 | (issue 73 | 'error 74 | 'match:bind-else 75 | #) 76 | 77 | ---------------------- 78 | [Wednesday, August 26th, 2020 3:33:29am] Processing /Users/sorawee/git/racket-repos/racket-lang-org/blog/_src/xml-from-blogger/xml.rkt 79 | (issue 80 | 'error 81 | 'match:bind-else 82 | #md xexprs) (list "`")))) ((list* (quote li) stuff)...>) 83 | 84 | ---------------------- 85 | [Wednesday, August 26th, 2020 3:33:56am] Processing /Users/sorawee/git/racket-repos/scribble/scribble-lib/scribble/private/lp.rkt 86 | (issue 87 | 'error 88 | 'syntax-case:bind-else 89 | #list (syntax (mod (... ...)))))) (cond ((null? mods) null) (else (syntax-case (car mods) (for-syntax) ((for-syntax x (... ...)) (append (loop (syntax->list (syntax (x (... .....>) 90 | 91 | ---------------------- 92 | [Wednesday, August 26th, 2020 3:33:59am] Processing /Users/sorawee/git/racket-repos/scribble/scribble-lib/scribble/srcdoc.rkt 93 | (issue 94 | 'error 95 | 'syntax-case:bind-else 96 | #list (syntax (arg ...)))))) (syntax (op arg ...)))) (else (shift-and-introduce r)))>) 97 | (issue 98 | 'error 99 | 'syntax-case:bind-else 100 | #i" snd)))>) 101 | (issue 102 | 'error 103 | 'syntax-case:bind-else 104 | #) 105 | (issue 106 | 'error 107 | 'syntax-case:bind-else 108 | #d -> ->* values case->) (((-> ctcs ... result) (arg-names ...)) (begin (unless (= (length (syntax->list (syntax (ctcs ...)))) (length (syntax->list (syntax (arg-names ...))))) (raise-syntax-error #f "mismatched ...>) 109 | 110 | -------------------------------------------------------------------------------- /result-racket.txt: -------------------------------------------------------------------------------- 1 | 2 | ---------------------- 3 | [Wednesday, August 26th, 2020 2:55:21am] Processing /Users/sorawee/git/racket/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/pidigits-gmp.rkt 4 | (issue 5 | 'error 6 | 'syntax-case:bind-else 7 | #) 8 | 9 | ---------------------- 10 | [Wednesday, August 26th, 2020 2:57:00am] Processing /Users/sorawee/git/racket/racket/collects/ffi/unsafe.rkt 11 | (issue 12 | 'error 13 | 'syntax-case:bind-else 14 | #) 15 | 16 | ---------------------- 17 | [Wednesday, August 26th, 2020 2:57:13am] Processing /Users/sorawee/git/racket/racket/collects/racket/cmdline.rkt 18 | (issue 19 | 'error 20 | 'syntax-case:bind-else 21 | #list (syntax (flag ...))))) (unless (andmap (lambda (x) (string? (syntax-e x))) flags) (serror "flag specification is not a string or sequence of strings" (syntax-case (car sublin...>) 22 | (issue 23 | 'error 24 | 'syntax-case:bind-else 25 | #) 26 | 27 | ---------------------- 28 | [Wednesday, August 26th, 2020 2:57:18am] Processing /Users/sorawee/git/racket/racket/collects/racket/private/check.rkt 29 | (issue 30 | 'error 31 | 'syntax-case:bind-else 32 | #) 33 | 34 | ---------------------- 35 | [Wednesday, August 26th, 2020 2:57:29am] Processing /Users/sorawee/git/racket/racket/collects/syntax/path-spec.rkt 36 | (issue 37 | 'error 38 | 'syntax-case:bind-else 39 | #datum fn)))...>) 40 | 41 | ---------------------- 42 | [Wednesday, August 26th, 2020 2:57:37am] Processing /Users/sorawee/git/racket/racket/share/pkgs/aws/aws/tests/data.rkt 43 | (issue 44 | 'error 45 | 'match:bind-else 46 | #) 47 | 48 | ---------------------- 49 | [Wednesday, August 26th, 2020 2:57:38am] Processing /Users/sorawee/git/racket/racket/share/pkgs/class-iop-lib/racket/class/private/class-iop-ct.rkt 50 | (issue 51 | 'error 52 | 'syntax-case:bind-else 53 | #) 54 | 55 | ---------------------- 56 | [Wednesday, August 26th, 2020 2:57:41am] Processing /Users/sorawee/git/racket/racket/share/pkgs/compatibility-lib/mzlib/cmdline.rkt 57 | (issue 58 | 'error 59 | 'syntax-case:bind-else 60 | #list (syntax (flag ...)))) (serror "flag specification is not a string or sequence of strings" (syntax (flag ...)))) (syntax (flag .....>) 61 | (issue 62 | 'error 63 | 'syntax-case:bind-else 64 | #) 65 | 66 | ---------------------- 67 | [Wednesday, August 26th, 2020 2:57:42am] Processing /Users/sorawee/git/racket/racket/share/pkgs/compatibility-lib/mzlib/private/stxparamkey.rkt 68 | (issue 69 | 'error 70 | 'syntax-case:bind-else 71 | #) 72 | 73 | ---------------------- 74 | [Wednesday, August 26th, 2020 2:57:42am] Processing /Users/sorawee/git/racket/racket/share/pkgs/compatibility-lib/mzlib/private/stxset.rkt 75 | (issue 76 | 'error 77 | 'syntax-case:bind-else 78 | #list (syntax (id ...)))) (list defn)) ((define-values . _) (raise-syntax-error #f "bad definition" stx defn)) ((define-syntaxes (id ...) ...>) 79 | 80 | ---------------------- 81 | [Wednesday, August 26th, 2020 2:57:43am] Processing /Users/sorawee/git/racket/racket/share/pkgs/compatibility-lib/mzlib/serialize.rkt 82 | (issue 83 | 'error 84 | 'syntax-case:bind-else 85 | #) 86 | (issue 87 | 'error 88 | 'syntax-case:bind-else 89 | #list (syntax (field ...))))) (for-each (lambda (id) (unless (identifier? id) (raise-syntax-error #f "expected a field identifier" stx id))) field-ids) field-ids)) (else (raise-syntax-erro...>) 90 | (issue 91 | 'error 92 | 'syntax-case:bind-else 93 | #) 94 | 95 | ---------------------- 96 | [Wednesday, August 26th, 2020 2:58:10am] Processing /Users/sorawee/git/racket/racket/share/pkgs/db-lib/db/private/cassandra/message.rkt 97 | (issue 98 | 'error 99 | 'match:bind-else 100 | #string/latin-1 bs)) ((or (quote bigint) (quote int)) (integer-bytes->integer bs #t #t)) ((quote blob) bs) ((quote boolean) (not (equal? bs #"\0"))) ((quote decimal) (define nexp (integer-bytes->integer bs #t #t 0 4)) (...>) 101 | (issue 102 | 'error 103 | 'match:bind-else 104 | #bytes/latin-1 v)) ((quote bigint) (unless (int64? v) (err)) (integer->integer-bytes v 8 #t #t)) ((quote int) (unless (int32? v) (err)) (integer->in...>) 105 | 106 | ---------------------- 107 | [Wednesday, August 26th, 2020 2:58:19am] Processing /Users/sorawee/git/racket/racket/share/pkgs/deinprogramm/deinprogramm/DMdA/private/DMdA-langs.rkt 108 | (issue 109 | 'error 110 | 'match:bind-else 111 | #) 112 | (issue 113 | 'error 114 | 'match:bind-else 115 | #) 116 | 117 | ---------------------- 118 | [Wednesday, August 26th, 2020 2:58:20am] Processing /Users/sorawee/git/racket/racket/share/pkgs/deinprogramm/deinprogramm/DMdA/private/primitives.rkt 119 | (issue 120 | 'error 121 | 'syntax-case:bind-else 122 | #) 123 | 124 | ---------------------- 125 | [Wednesday, August 26th, 2020 2:58:29am] Processing /Users/sorawee/git/racket/racket/share/pkgs/deinprogramm/deinprogramm/sdp/private/sdp-langs.rkt 126 | (issue 127 | 'error 128 | 'match:bind-else 129 | #) 130 | (issue 131 | 'error 132 | 'match:bind-else 133 | #) 134 | 135 | ---------------------- 136 | [Wednesday, August 26th, 2020 2:58:30am] Processing /Users/sorawee/git/racket/racket/share/pkgs/deinprogramm/deinprogramm/sdp/record.rkt 137 | (issue 138 | 'error 139 | 'syntax-case:bind-else 140 | #) 141 | 142 | ---------------------- 143 | [Wednesday, August 26th, 2020 2:58:32am] Processing /Users/sorawee/git/racket/racket/share/pkgs/deinprogramm/deinprogramm/signature/module-begin.rkt 144 | (issue 145 | 'error 146 | 'syntax-case:bind-else 147 | # (lambda (sig) (free-id-table-remove! signature-table id) (with-syntax ((?id i...>) 148 | 149 | ---------------------- 150 | [Wednesday, August 26th, 2020 2:58:39am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed/examples/logging/bank.rkt 151 | (issue 152 | 'error 153 | 'match:bind-else 154 | #) 155 | 156 | ---------------------- 157 | [Wednesday, August 26th, 2020 2:58:39am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed/examples/multiple/bank.rkt 158 | (issue 159 | 'error 160 | 'match:bind-else 161 | #) 162 | 163 | ---------------------- 164 | [Wednesday, August 26th, 2020 2:58:40am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed/examples/named/bank.rkt 165 | (issue 166 | 'error 167 | 'match:bind-else 168 | #) 169 | 170 | ---------------------- 171 | [Wednesday, August 26th, 2020 2:58:40am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed/examples/thread/master.rkt 172 | (issue 173 | 'error 174 | 'match:bind-else 175 | #) 176 | 177 | ---------------------- 178 | [Wednesday, August 26th, 2020 2:58:41am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed/map-reduce.rkt 179 | (issue 180 | 'error 181 | 'match:bind-else 182 | #string/locale fn))) ((cons h t) (cons (->module-path h) (->module-path t))) ((? bytes?) (bytes->path x)) (else x))>) 183 | (issue 184 | 'error 185 | 'match:bind-else 186 | #) 187 | (issue 188 | 'error 189 | 'match:bind-else 190 | #) 191 | 192 | ---------------------- 193 | [Wednesday, August 26th, 2020 2:58:43am] Processing /Users/sorawee/git/racket/racket/share/pkgs/distributed-places-lib/racket/place/distributed.rkt 194 | (issue 195 | 'error 196 | 'match:bind-else 197 | #) 198 | (issue 199 | 'error 200 | 'match:bind-else 201 | #) 202 | (issue 203 | 'error 204 | 'match:bind-else 205 | #) 206 | (issue 207 | 'error 208 | 'cond:invalid-else 209 | #) 210 | (issue 211 | 'error 212 | 'match:bind-else 213 | #) 214 | (issue 215 | 'error 216 | 'match:bind-else 217 | #) 218 | (issue 219 | 'error 220 | 'cond:invalid-else 221 | #) 222 | (issue 223 | 'error 224 | 'match:bind-else 225 | #) 226 | (issue 227 | 'error 228 | 'match:bind-else 229 | # (lambda (rp) (send rp place-died))) (else (raise (format "remote-place for sc-id ~...>) 230 | 231 | ---------------------- 232 | [Wednesday, August 26th, 2020 2:59:27am] Processing /Users/sorawee/git/racket/racket/share/pkgs/frtime/frlibs/etc.rkt 233 | (issue 234 | 'error 235 | 'syntax-case:bind-else 236 | #) 237 | 238 | ---------------------- 239 | [Wednesday, August 26th, 2020 2:59:32am] Processing /Users/sorawee/git/racket/racket/share/pkgs/frtime/opt/frtime-opt.rkt 240 | (issue 241 | 'error 242 | 'syntax-case:bind-else 243 | #) 244 | 245 | ---------------------- 246 | [Wednesday, August 26th, 2020 3:00:19am] Processing /Users/sorawee/git/racket/racket/share/pkgs/htdp-lib/2htdp/itunes.rkt 247 | (issue 248 | 'error 249 | 'match:bind-else 250 | #xexpr (cleanup (document-element itunes:xml))) ((quasiquote (plist ((version (unquote n))) (dict (unquote _attributes) (unquote body) ...))) body) (else (check-arg tag #f "XML file exported from iTunes (1)" "first" file)))>) 251 | (issue 252 | 'error 253 | 'match:bind-else 254 | #) 255 | (issue 256 | 'error 257 | 'match:bind-else 258 | #number i)) ((quasiquote (real (unquote _attributes) (unquote i))) (string->number i)) ((quasiquote ...>) 259 | (issue 260 | 'error 261 | 'match:bind-else 262 | #value) "unknown kind of dict-key: ~e" x)))>) 263 | 264 | ---------------------- 265 | [Wednesday, August 26th, 2020 3:00:51am] Processing /Users/sorawee/git/racket/racket/share/pkgs/htdp-lib/stepper/private/view-controller-typed.rkt 266 | (issue 267 | 'error 268 | 'match:bind-else 269 | #) 270 | (issue 271 | 'error 272 | 'match:bind-else 273 | #) 274 | 275 | ---------------------- 276 | [Wednesday, August 26th, 2020 3:02:24am] Processing /Users/sorawee/git/racket/racket/share/pkgs/macro-debugger/macro-debugger/view/process-deriv.rkt 277 | (issue 278 | 'error 279 | 'match:bind-else 280 | #) 281 | 282 | ---------------------- 283 | [Wednesday, August 26th, 2020 3:02:40am] Processing /Users/sorawee/git/racket/racket/share/pkgs/math-lib/math/private/array/array-syntax.rkt 284 | (issue 285 | 'error 286 | 'syntax-case:bind-else 287 | #list (syntax (e ...))))) (for/fold ((acc acc)) ((lst (in-list lst))) (loop lst acc)))) (else (cons e-stx acc)))>) 288 | 289 | ---------------------- 290 | [Wednesday, August 26th, 2020 3:04:43am] Processing /Users/sorawee/git/racket/racket/share/pkgs/pict-lib/texpict/code.rkt 291 | (issue 292 | 'error 293 | 'syntax-case:bind-else 294 | # a-pos pos)) (vector src li...>) 295 | 296 | ---------------------- 297 | [Wednesday, August 26th, 2020 3:04:51am] Processing /Users/sorawee/git/racket/racket/share/pkgs/plai-lib/gc2/mutator.rkt 298 | (issue 299 | 'error 300 | 'syntax-case:bind-else 301 | #syntax (syntax collector-module) (cons (syntax quote) (syntax x)))) (else (syntax collector-module)))>) 302 | 303 | ---------------------- 304 | [Wednesday, August 26th, 2020 3:06:53am] Processing /Users/sorawee/git/racket/racket/share/pkgs/pollen/pollen/tag.rkt 305 | (issue 306 | 'error 307 | 'match:bind-else 308 | #) 309 | 310 | ---------------------- 311 | [Wednesday, August 26th, 2020 3:07:12am] Processing /Users/sorawee/git/racket/racket/share/pkgs/r6rs-lib/rnrs/control-6.rkt 312 | (issue 313 | 'error 314 | 'syntax-case:bind-else 315 | #list (syntax (id ...)))) clause) ((id ... . rest) (and (identifier? (syntax rest)) (andmap identifier? (syntax->list (syntax (id ......>) 316 | 317 | ---------------------- 318 | [Wednesday, August 26th, 2020 3:07:14am] Processing /Users/sorawee/git/racket/racket/share/pkgs/r6rs-lib/rnrs/syntax-case-6.rkt 319 | (issue 320 | 'error 321 | 'syntax-case:bind-else 322 | #) 323 | 324 | ---------------------- 325 | [Wednesday, August 26th, 2020 3:07:37am] Processing /Users/sorawee/git/racket/racket/share/pkgs/racklog/unify.rkt 326 | (issue 327 | 'error 328 | 'match:bind-else 329 | #) 330 | 331 | ---------------------- 332 | [Wednesday, August 26th, 2020 3:08:27am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-benchmark/redex/benchmark/private/logging.rkt 333 | (issue 334 | 'error 335 | 'match:bind-else 336 | #) 337 | 338 | ---------------------- 339 | [Wednesday, August 26th, 2020 3:08:49am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-examples/redex/examples/beginner.rkt 340 | (issue 341 | 'error 342 | 'match:bind-else 343 | #) 344 | 345 | ---------------------- 346 | [Wednesday, August 26th, 2020 3:09:05am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-examples/redex/examples/letrec.rkt 347 | (issue 348 | 'error 349 | 'match:bind-else 350 | #) 351 | 352 | ---------------------- 353 | [Wednesday, August 26th, 2020 3:09:18am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-examples/redex/examples/racket-machine/randomized-tests.rkt 354 | (issue 355 | 'error 356 | 'match:bind-else 357 | #) 358 | (issue 359 | 'error 360 | 'match:bind-else 361 | #) 362 | (issue 363 | 'error 364 | 'match:bind-else 365 | #) 366 | (issue 367 | 'error 368 | 'match:bind-else 369 | #) 370 | 371 | ---------------------- 372 | [Wednesday, August 26th, 2020 3:09:29am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-examples/redex/examples/subject-reduction.rkt 373 | (issue 374 | 'error 375 | 'match:bind-else 376 | # (unquote tr))) (if (equal? td t2) tr (k #f))) (else (k #f)))>) 377 | 378 | ---------------------- 379 | [Wednesday, August 26th, 2020 3:09:37am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-lib/redex/private/keyword-macros.rkt 380 | (issue 381 | 'error 382 | 'syntax-case:bind-else 383 | #) 384 | 385 | ---------------------- 386 | [Wednesday, August 26th, 2020 3:09:39am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-lib/redex/private/red-sem-macro-helpers.rkt 387 | (issue 388 | 'error 389 | 'match:bind-else 390 | #) 391 | 392 | ---------------------- 393 | [Wednesday, August 26th, 2020 3:09:40am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-lib/redex/private/trace-layout.rkt 394 | (issue 395 | 'error 396 | 'match:bind-else 397 | #) 398 | 399 | ---------------------- 400 | [Wednesday, August 26th, 2020 3:10:14am] Processing /Users/sorawee/git/racket/racket/share/pkgs/redex-test/redex/tests/unify-tests.rkt 401 | (issue 402 | 'error 403 | 'match:bind-else 404 | #) 405 | (issue 406 | 'error 407 | 'match:bind-else 408 | #) 409 | (issue 410 | 'error 411 | 'match:bind-else 412 | #) 413 | 414 | ---------------------- 415 | [Wednesday, August 26th, 2020 3:10:27am] Processing /Users/sorawee/git/racket/racket/share/pkgs/scribble-enhanced/racket.rkt 416 | (issue 417 | 'error 418 | 'syntax-case:bind-else 419 | #) 420 | (issue 421 | 'error 422 | 'syntax-case:bind-else 423 | #loc-s-expr (syntax-e v))))>) 424 | 425 | ---------------------- 426 | [Wednesday, August 26th, 2020 3:20:56am] Processing /Users/sorawee/git/racket/racket/share/pkgs/typed-racket-test/succeed/pr10057.rkt 427 | (issue 428 | 'error 429 | 'match:bind-else 430 | #) 431 | 432 | ---------------------- 433 | [Wednesday, August 26th, 2020 3:24:58am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-lib/web-server/default-web-root/htdocs/servlets/examples/basic.rkt 434 | (issue 435 | 'error 436 | 'match:bind-else 437 | #basic-credentials req) ((cons user pass) (quasiquote (html (head (title "Basic Auth Test")) (body (h1 "User: " (unquote (bytes->string/utf-8 user))) (h1 "Pass: " (unquote (bytes->string/utf-8 pass))))))) (else (response 401 #"Unauthoriz...>) 438 | 439 | ---------------------- 440 | [Wednesday, August 26th, 2020 3:24:59am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-lib/web-server/default-web-root/htdocs/servlets/examples/cookie2.rkt 441 | (issue 442 | 'error 443 | 'match:bind-else 444 | #string/utf-8 (binding:form-value b))) (redirect-to (url->string (request-uri req)) see-other #:headers (list (cookie->header (make-cookie "id" new-who))))) (else (redirect-...>) 445 | 446 | ---------------------- 447 | [Wednesday, August 26th, 2020 3:25:15am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-lib/web-server/http/status-code.rkt 448 | (issue 449 | 'error 450 | 'match:bind-else 451 | #bytes/utf-8 s)) (else DEFAULT-STATUS-MESSAGE))>) 452 | (issue 453 | 'error 454 | 'match:bind-else 455 | #bytes/utf-8 s)) (else DEFAULT-STATUS-MESSAGE))))>) 456 | 457 | ---------------------- 458 | [Wednesday, August 26th, 2020 3:25:23am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-lib/web-server/private/xexpr.rkt 459 | (issue 460 | 'error 461 | 'match:bind-else 462 | #) 463 | (issue 464 | 'error 465 | 'match:bind-else 466 | #) 467 | (issue 468 | 'error 469 | 'match:bind-else 470 | #) 471 | 472 | ---------------------- 473 | [Wednesday, August 26th, 2020 3:25:33am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-test/tests/web-server/dispatch-test.rkt 474 | (issue 475 | 'error 476 | 'match:bind-else 477 | #url "http://www.example.com/new") ((url/paths "new") #t) (else #f))>) 478 | (issue 479 | 'error 480 | 'match:bind-else 481 | #url "http://www.example.com/") ((url/paths "") #t) (else #f))>) 482 | (issue 483 | 'error 484 | 'match:bind-else 485 | #url "http://www.example.com") ((url/paths) #t) (else #f))>) 486 | (issue 487 | 'error 488 | 'match:bind-else 489 | #url "http://www.example.com/foo") ((url/paths "new") #t) (else #f))>) 490 | (issue 491 | 'error 492 | 'match:bind-else 493 | #url "http://www.example.com/new/50") ((url/paths "new" (integer-arg a)) a) (else #f))>) 494 | (issue 495 | 'error 496 | 'match:bind-else 497 | #url "http://www.example.com/new") ((url/paths "new" (integer-arg a)) a) (else #f))>) 498 | (issue 499 | 'error 500 | 'match:bind-else 501 | #url "http://www.example.com/new")) ((request/url (url/paths "new")) #t) (else #f))>) 502 | (issue 503 | 'error 504 | 'match:bind-else 505 | #url "http://www.example.com/new/50")) ((request/url (url/paths "new" (integer-arg a))) a) (else #f))>) 506 | 507 | ---------------------- 508 | [Wednesday, August 26th, 2020 3:26:19am] Processing /Users/sorawee/git/racket/racket/share/pkgs/web-server-test/tests/web-server/util.rkt 509 | (issue 510 | 'error 511 | 'syntax-case:bind-else 512 | #) 513 | 514 | ---------------------- 515 | [Wednesday, August 26th, 2020 3:26:27am] Processing /Users/sorawee/git/racket/racket/src/expander/common/inline.rkt 516 | (issue 517 | 'error 518 | 'syntax-case:bind-else 519 | #) 520 | 521 | ---------------------- 522 | [Wednesday, August 26th, 2020 3:26:27am] Processing /Users/sorawee/git/racket/racket/src/expander/common/struct-star.rkt 523 | (issue 524 | 'error 525 | 'syntax-case:bind-else 526 | #) 527 | 528 | ---------------------- 529 | [Wednesday, August 26th, 2020 3:26:34am] Processing /Users/sorawee/git/racket/racket/src/io/common/class.rkt 530 | (issue 531 | 'error 532 | 'syntax-case:bind-else 533 | #) 534 | 535 | -------------------------------------------------------------------------------- /scribblings/racket-analysis.scrbl: -------------------------------------------------------------------------------- 1 | #lang scribble/manual 2 | @require[@for-label[racket-analysis 3 | racket/base]] 4 | 5 | @title{racket-analysis} 6 | @author{sorawee} 7 | 8 | @defmodule[racket-analysis] 9 | 10 | Package Description Here 11 | -------------------------------------------------------------------------------- /test.rkt: -------------------------------------------------------------------------------- 1 | #lang racket 2 | 3 | (cond 4 | [else 3]) 5 | 6 | (let ([else #f]) 7 | (cond 8 | [else 2])) 9 | 10 | (let ([cond 1] 11 | [else 2]) 12 | (cond 13 | [else 2])) 14 | 15 | (match #f 16 | [else (cond 17 | [else 3])]) 18 | 19 | (cond 20 | [1 2] 21 | [3 4]) 22 | 23 | (match 1 24 | [_else 1]) 25 | 26 | (case 1 27 | [else 1]) 28 | --------------------------------------------------------------------------------