mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Code smell test for specifying both required and default in FieldAttributes
This commit is contained in:
parent
de703f81dd
commit
04fc3f118f
2 changed files with 11 additions and 0 deletions
10
test/code-smell/required-and-default-attributes.sh
Executable file
10
test/code-smell/required-and-default-attributes.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
BASEDIR=${1-"lib/ansible"}
|
||||
cd "$BASEDIR"
|
||||
grep -r FieldAttribute . |grep 'default' | grep 'required'
|
||||
if test $? -eq 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue