Skip to content

Commit

Permalink
Make the linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer committed Apr 11, 2024
1 parent 87a27ef commit 1944e46
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lint:
ct lint \
--target-branch=main \
--exclude-deprecated \
--excluded-charts besu-node,besu-genesis\
--check-version-increment=false \
--lint-conf=./charts/lintconf.yaml
./hack/enforce-chart-conventions.sh
Expand Down
2 changes: 1 addition & 1 deletion charts/firefly-evmconnect/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ config:
connector: |
url: {{ .Values.config.jsonRpcUrl | quote }}
policyEngine: {}
policyEngine: ""

policyLoop: {}

Expand Down
8 changes: 7 additions & 1 deletion charts/firefly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ config:
# The URL + URI Go template of an address resolver connector
addresssResolverUrlTemplate: ""

# The Ethereum address of the _original_, pre-deployed FireFly smart contract
fireflyContractAddress: "contractAddress"

# The block number of when the first event of the FireFly smart contract occurs
fireflyContractFirstEvent: 0

# The Ethereum address(es) or Fabric chaincode(s) of the additional FireFly smart contract instances
fireflyContracts: []
# for ethereum
Expand Down Expand Up @@ -409,7 +415,7 @@ erc1155:
enabled: false

# The address of the deployed ERC1155 contract to use
contractAddress:
contractAddress: "/contracts/erc1155Address"

# The Ethconnect URI representing the ERC1155 tokens contract
ethconnectInstance: "/contracts/erc1155"
Expand Down
21 changes: 12 additions & 9 deletions hack/enforce-chart-conventions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
failed=0
for yamlTemplate in $(find ./charts -regex '^\.\/charts\/.*\/templates\/[^\/]*.*\/*.*\.yaml'); do
kind=$(cat $yamlTemplate | grep -e '^kind:' | awk '{ printf("%s\n", $2) }' | tr '[:upper:]' '[:lower:]')
if ! basename "$yamlTemplate" | grep -E "^${kind}[s]?\-?[a-z\-]*\.yaml$" > /dev/null; then
echo "ERROR: $yamlTemplate filename does not start with $kind"
failed=$(($failed+1))
fi

if ! cat $yamlTemplate | grep "$(cat ./charts/license.tpl)" > /dev/null; then
echo "ERROR: $yamlTemplate filename does not start with the license"
failed=$(($failed+1))
fi

case "$yamlTemplate" in
*"./charts/besu-"*)
# Ingore the besu charts as they were just copied over from their repo
;;
*)
if ! cat $yamlTemplate | grep "$(cat ./charts/license.tpl)" > /dev/null; then
echo "ERROR: $yamlTemplate filename does not start with the license"
failed=$(($failed+1))
fi
;;
esac
done

if [[ $failed -gt 0 ]]; then
Expand Down

0 comments on commit 1944e46

Please sign in to comment.