-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(revive): Adds built-in support for repo-level revive.toml (#20)
Modifies revive hooks: * Auto-adds '-config=revive.toml' argument if file is present in repository root * Triggers hooks when repo-level revive.toml is modified * Updates README NOTE: Although the file-based go-revive hook is configured to trigger when revive.toml is modified, it will essentially do nothing if there are no .go files staged. We might consider adding some logic to run against ALL .go files in the repo, but I'm really not sure thats a good idea, and I probably didn't need to add a trigger to the file-level hook at all.
- Loading branch information
Showing
6 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/usr/bin/env bash | ||
cmd=(revive) | ||
if [ -f "revive.toml" ]; then | ||
cmd+=( "-config=revive.toml" ) | ||
fi | ||
. "$(dirname "${0}")/lib/cmd-mod.bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/usr/bin/env bash | ||
cmd=(revive) | ||
if [ -f "revive.toml" ]; then | ||
cmd+=( "-config=revive.toml" ) | ||
fi | ||
. "$(dirname "${0}")/lib/cmd-repo-mod.bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env bash | ||
cmd=(revive) | ||
if [ -f "revive.toml" ]; then | ||
cmd+=( "-config=revive.toml" ) | ||
fi | ||
ignore_file_pattern_array=( "revive.toml" ) | ||
. "$(dirname "${0}")/lib/cmd-files.bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters