Commit d80a9f5
committed
lint: make a smarter mutex lock linter
This commit udpates the lock linter to work by
keeping track of locks and if we find any
if conditions, loops, or function calls before
finding a matching unlock it will report. It will
also report if the matching unlock is >5 lines away
from the lock. It will ignore cases where a
`nolint:deferunlock` is present.
Release note: None1 parent 8368312 commit d80a9f5
File tree
285 files changed
+573
-999
lines changed- build/bazelutil
- pkg
- acceptance/localcluster
- ccl
- auditloggingccl
- backupccl
- backupinfo
- changefeedccl
- cdctest
- kvevent
- schemafeed
- multiregionccl
- multitenantccl/tenantcostclient
- spanconfigccl
- spanconfigsqltranslatorccl
- spanconfigsqlwatcherccl
- sqlproxyccl
- acl
- balancer
- tenantdirsvr
- streamingccl
- streamclient
- streamingest
- streamproducer
- cli
- clisqlexec
- clisqlshell
- syncbench
- cmd
- allocsim
- roachtest
- zerosum
- config
- gossip
- internal
- rsg
- sqlsmith
- jobs
- kv
- bulk
- kvclient
- kvcoord
- kvstreamer
- kvtenant
- rangecache
- rangefeed
- rangefeedcache
- kvnemesis
- kvserver
- allocator
- allocatorimpl
- storepool
- closedts
- sidetransport
- tracker
- concurrency
- idalloc
- intentresolver
- kvflowcontrol/kvflowhandle
- liveness
- protectedts
- ptcache
- ptreconcile
- raftentry
- rangefeed
- spanlatch
- txnwait
- multitenant/tenantcapabilities
- tenantcapabilitiesauthorizer
- tenantcapabilitieswatcher
- obs
- roachprod
- install
- vm
- aws
- azure
- rpc
- nodedialer
- security
- server
- profiler
- telemetry
- tenantsettingswatcher
- settings
- spanconfig
- spanconfigjob
- spanconfigkvsubscriber
- spanconfigmanager
- spanconfigreconciler
- sql
- catalog/lease
- colfetcher
- colflow
- contention
- contentionutils
- flowinfra
- idxusage
- importer
- pgwire
- rowexec
- rowflow
- schemachanger/corpus
- sem/builtins
- sessiondata
- sqlliveness/slinstance
- sqlstats/ssmemstorage
- stmtdiagnostics
- tests
- storage
- metamorphic
- testutils
- distsqlutils
- lint
- passes/deferunlockcheck
- testdata/src/a
- storageutils
- testfixtures
- util
- admission
- circuit
- goschedstats
- hlc
- interval
- log
- metric
- mon
- randutil
- schedulerlatency
- startup
- stop
- syncutil
- singleflight
- timeutil/pgdate
- tracing
- ulid
- workload
- histogram
- schemachange
- tpcc
- ycsb
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
285 files changed
+573
-999
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | 478 | | |
480 | 479 | | |
481 | 480 | | |
| |||
589 | 588 | | |
590 | 589 | | |
591 | 590 | | |
592 | | - | |
593 | 591 | | |
594 | 592 | | |
595 | 593 | | |
| |||
697 | 695 | | |
698 | 696 | | |
699 | 697 | | |
700 | | - | |
701 | 698 | | |
702 | 699 | | |
703 | 700 | | |
| |||
720 | 717 | | |
721 | 718 | | |
722 | 719 | | |
723 | | - | |
724 | 720 | | |
725 | 721 | | |
726 | 722 | | |
727 | 723 | | |
728 | 724 | | |
729 | 725 | | |
730 | | - | |
731 | 726 | | |
732 | 727 | | |
733 | 728 | | |
| |||
744 | 739 | | |
745 | 740 | | |
746 | 741 | | |
747 | | - | |
748 | 742 | | |
749 | 743 | | |
750 | 744 | | |
| |||
775 | 769 | | |
776 | 770 | | |
777 | 771 | | |
778 | | - | |
779 | 772 | | |
780 | 773 | | |
781 | 774 | | |
| |||
811 | 804 | | |
812 | 805 | | |
813 | 806 | | |
814 | | - | |
815 | 807 | | |
816 | 808 | | |
817 | 809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2593 | 2593 | | |
2594 | 2594 | | |
2595 | 2595 | | |
2596 | | - | |
2597 | 2596 | | |
2598 | 2597 | | |
2599 | 2598 | | |
2600 | | - | |
2601 | 2599 | | |
2602 | 2600 | | |
2603 | 2601 | | |
| |||
2626 | 2624 | | |
2627 | 2625 | | |
2628 | 2626 | | |
2629 | | - | |
2630 | 2627 | | |
2631 | 2628 | | |
2632 | 2629 | | |
| |||
6208 | 6205 | | |
6209 | 6206 | | |
6210 | 6207 | | |
6211 | | - | |
6212 | 6208 | | |
6213 | 6209 | | |
6214 | 6210 | | |
| |||
6391 | 6387 | | |
6392 | 6388 | | |
6393 | 6389 | | |
6394 | | - | |
6395 | 6390 | | |
6396 | 6391 | | |
6397 | 6392 | | |
| |||
6402 | 6397 | | |
6403 | 6398 | | |
6404 | 6399 | | |
6405 | | - | |
6406 | 6400 | | |
6407 | 6401 | | |
6408 | 6402 | | |
| |||
6421 | 6415 | | |
6422 | 6416 | | |
6423 | 6417 | | |
6424 | | - | |
6425 | 6418 | | |
6426 | 6419 | | |
6427 | 6420 | | |
| |||
6455 | 6448 | | |
6456 | 6449 | | |
6457 | 6450 | | |
6458 | | - | |
6459 | 6451 | | |
6460 | 6452 | | |
6461 | 6453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | | - | |
1545 | 1544 | | |
1546 | 1545 | | |
1547 | 1546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | 321 | | |
323 | 322 | | |
324 | 323 | | |
| |||
2154 | 2153 | | |
2155 | 2154 | | |
2156 | 2155 | | |
2157 | | - | |
2158 | 2156 | | |
2159 | 2157 | | |
2160 | 2158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | 434 | | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
439 | | - | |
440 | 438 | | |
441 | 439 | | |
442 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | | - | |
1191 | 1190 | | |
1192 | 1191 | | |
1193 | 1192 | | |
| |||
1230 | 1229 | | |
1231 | 1230 | | |
1232 | 1231 | | |
1233 | | - | |
1234 | 1232 | | |
1235 | 1233 | | |
1236 | 1234 | | |
| |||
1383 | 1381 | | |
1384 | 1382 | | |
1385 | 1383 | | |
1386 | | - | |
1387 | 1384 | | |
1388 | 1385 | | |
1389 | 1386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
650 | 649 | | |
651 | 650 | | |
652 | 651 | | |
653 | 652 | | |
654 | 653 | | |
655 | 654 | | |
656 | 655 | | |
657 | | - | |
658 | 656 | | |
659 | 657 | | |
660 | 658 | | |
| |||
708 | 706 | | |
709 | 707 | | |
710 | 708 | | |
711 | | - | |
712 | 709 | | |
713 | 710 | | |
714 | 711 | | |
| |||
0 commit comments