Skip to content

Commit

Permalink
Merge pull request #90 from openconfig/report-pyang-warnings
Browse files Browse the repository at this point in the history
Report pyang warnings as errors
  • Loading branch information
wenovus authored Oct 13, 2023
2 parents fbdfaa6 + a605d29 commit e19e17b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd_gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ script_options=(
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
shift 2
echo pyang "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
echo pyang -W error "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd -W error "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
mv ${prefix}pass ${prefix}fail
fi
}
Expand Down
8 changes: 4 additions & 4 deletions cmd_gen/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ script_options=(
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
shift 2
echo pyang "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
echo pyang -W error "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd -W error "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
mv ${prefix}pass ${prefix}fail
fi
}
Expand Down Expand Up @@ -97,8 +97,8 @@ script_options=(
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
shift 2
echo pyang "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
echo pyang -W error "${options[@]}" "$@" > ${prefix}cmd
if ! $($cmd -W error "${options[@]}" "${script_options[@]}" "$@" &> ${prefix}pass); then
mv ${prefix}pass ${prefix}fail
fi
}
Expand Down

0 comments on commit e19e17b

Please sign in to comment.