|
358 | 358 | # go-revive
|
359 | 359 | # * File-based
|
360 | 360 | # * Executes if any .go files modified
|
| 361 | +# * Executes if revive.toml modified |
| 362 | +# * Adds arg '-config=revive.toml' if present |
| 363 | +# NOTE: Does nothing if ONLY revive.toml is modified (ie no .go files modified) |
361 | 364 | # ==============================================================================
|
362 | 365 | - id: go-revive
|
363 | 366 | name: 'go-revive'
|
364 | 367 | entry: go-revive.sh
|
365 |
| - types: [go] |
| 368 | + files: '(\.go$)|(\brevive\.toml$)' |
366 | 369 | exclude: '(^|/)vendor/'
|
367 | 370 | language: 'script'
|
368 | 371 | description: "Run 'revive [$ARGS] $FILE' for each staged .go file"
|
|
375 | 378 | # * Targets first parent folder with a go.mod file
|
376 | 379 | # * Executes if any .go files modified
|
377 | 380 | # * Executes if go.mod modified
|
| 381 | +# * Executes if revive.toml modified |
| 382 | +# * Adds arg '-config=revive.toml' if present |
378 | 383 | # ==============================================================================
|
379 | 384 | - id: go-revive-mod
|
380 | 385 | name: 'go-revive-mod'
|
381 | 386 | entry: go-revive-mod.sh
|
382 |
| - files: '(\.go$)|(\bgo\.mod$)' |
| 387 | + files: '(\.go$)|(\bgo\.mod$)|(\brevive\.toml$)' |
383 | 388 | exclude: '(^|/)vendor/'
|
384 | 389 | language: 'script'
|
385 | 390 | description: "Run 'cd $(mod_root $FILE); revive [$ARGS] ./...' for each staged .go file"
|
|
393 | 398 | # * Targets ALL folders with a go.mod file
|
394 | 399 | # * Executes if any .go files modified
|
395 | 400 | # * Executes if go.mod modified
|
| 401 | +# * Executes if revive.toml modified |
| 402 | +# * Adds arg '-config=revive.toml' if present |
396 | 403 | # ==============================================================================
|
397 | 404 | - id: go-revive-repo-mod
|
398 | 405 | name: 'go-revive-repo-mod'
|
399 | 406 | entry: go-revive-repo-mod.sh
|
400 |
| - files: '(\.go$)|(\bgo\.mod$)' |
| 407 | + files: '(\.go$)|(\bgo\.mod$)|(\brevive\.toml$)' |
401 | 408 | exclude: '(^|/)vendor/'
|
402 | 409 | language: 'script'
|
403 | 410 | description: "Run 'cd $(mod_root); revive [$ARGS] ./...' for each module in the repo"
|
|
0 commit comments