|
469 | 469 | description: "Run 'gosec [$ARGS] ./...' in repo root folder" |
470 | 470 | pass_filenames: false |
471 | 471 |
|
| 472 | +# ============================================================================== |
| 473 | +# go-staticcheck-mod |
| 474 | +# * Folder-Based |
| 475 | +# * Recursive |
| 476 | +# * Targets first parent folder with a go.mod file |
| 477 | +# * Executes if any .go files modified |
| 478 | +# * Executes if go.mod modified |
| 479 | +# ============================================================================== |
| 480 | +- id: go-staticcheck-mod |
| 481 | + name: 'go-staticcheck-mod' |
| 482 | + entry: go-staticcheck-mod.sh |
| 483 | + files: '(\.go$)|(\bgo\.mod$)' |
| 484 | + exclude: '(^|/)vendor/' |
| 485 | + language: 'script' |
| 486 | + description: "Run 'cd $(mod_root $FILE); staticcheck [$ARGS] ./...' for each staged .go file" |
| 487 | + pass_filenames: true |
| 488 | + require_serial: true |
| 489 | + |
| 490 | +# ============================================================================== |
| 491 | +# go-staticcheck-pkg |
| 492 | +# * Folder-Based |
| 493 | +# * Targets folder containing staged file |
| 494 | +# * Executes if any .go files modified |
| 495 | +# ============================================================================== |
| 496 | +- id: go-staticcheck-pkg |
| 497 | + name: 'go-staticcheck-pkg' |
| 498 | + entry: go-staticcheck-pkg.sh |
| 499 | + types: [go] |
| 500 | + exclude: '(^|/)vendor/' |
| 501 | + language: 'script' |
| 502 | + description: "Run 'staticcheck [$ARGS] ./$(dirname $FILE)' for each staged .go file" |
| 503 | + pass_filenames: true |
| 504 | + require_serial: true |
| 505 | + |
| 506 | +# ============================================================================== |
| 507 | +# go-staticcheck-repo-mod |
| 508 | +# * Repo-Based |
| 509 | +# * Recursive |
| 510 | +# * Targets ALL folders with a go.mod file |
| 511 | +# * Executes if any .go files modified |
| 512 | +# * Executes if go.mod modified |
| 513 | +# ============================================================================== |
| 514 | +- id: go-staticcheck-repo-mod |
| 515 | + name: 'go-staticcheck-repo-mod' |
| 516 | + entry: go-staticcheck-repo-mod.sh |
| 517 | + files: '(\.go$)|(\bgo\.mod$)' |
| 518 | + exclude: '(^|/)vendor/' |
| 519 | + language: 'script' |
| 520 | + description: "Run 'cd $(mod_root); staticcheck [$ARGS] ./...' for each module in the repo" |
| 521 | + pass_filenames: false |
| 522 | + |
| 523 | +# ============================================================================== |
| 524 | +# go-staticcheck-repo-pkg |
| 525 | +# * Repo-Based |
| 526 | +# * Recursive |
| 527 | +# * Executes if any .go files modified |
| 528 | +# ============================================================================== |
| 529 | +- id: go-staticcheck-repo-pkg |
| 530 | + name: 'go-staticcheck-repo-pkg' |
| 531 | + entry: go-staticcheck-repo-pkg.sh |
| 532 | + types: [go] |
| 533 | + exclude: '(^|/)vendor/' |
| 534 | + language: 'script' |
| 535 | + description: "Run 'staticcheck [$ARGS] ./...' in repo root folder" |
| 536 | + pass_filenames: false |
| 537 | + |
472 | 538 | # ============================================================================== |
473 | 539 | # go-test-mod |
474 | 540 | # * Folder-Based |
|
0 commit comments