-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1063 from jpverde/main
refac(back): #1055 update lintnix
- Loading branch information
Showing
6 changed files
with
46 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
__nixpkgs__, | ||
toBashArray, | ||
makeScript, | ||
... | ||
}: { | ||
name, | ||
targets, | ||
... | ||
}: makeScript { | ||
replace = { | ||
__argTargets__ = toBashArray targets; | ||
}; | ||
name = "lint-nix-for-${name}"; | ||
searchPaths = { | ||
bin = [ | ||
__nixpkgs__.statix | ||
]; | ||
}; | ||
entrypoint = ./entrypoint.sh; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# shellcheck shell=bash | ||
|
||
function main { | ||
export LANG=C.UTF-8 | ||
source __argTargets__/template local targets | ||
|
||
info Linting Nix code \ | ||
&& for target in "${targets[@]}"; do | ||
info Linting "${target}" \ | ||
&& if ! statix check "${args[@]}" "${target}"; then | ||
info Source code is being fixed, the job will fail \ | ||
&& statix fix "${args[@]}" "${target}" \ | ||
&& error Failing as promissed... | ||
fi \ | ||
|| return 1 | ||
done | ||
} | ||
|
||
main "${@}" |
This file was deleted.
Oops, something went wrong.
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