.PHONY: devp/check/git
devp/check/git:
	@# Check that git tree is clean. You can pass $REPLACED_MESSAGE variable to replace message text when working tree is not clean
	$(Q) echo "Checking that git tree is clean"
	$(Q) ${DEVP_SCRIPTS}/check-clean-working-tree.sh

.PHONY: devp/ci/check
devp/ci/check: devp/ci/check/go-mod-tidy \
devp/ci/check/reinstall \
devp/ci/check/format-go \
devp/lint-go-default
	@# Perform default platform CI checks

.PHONY: devp/ci/check/go-mod-tidy
devp/ci/check/go-mod-tidy: devp/go-mod-tidy
	@# Check there are no changes after devp/go-mod-tidy
	$(Q) ${DEVP_SCRIPTS}/check-clean-working-tree.sh "make devp/go-mod-tidy"

.PHONY: devp/ci/check/reinstall
devp/ci/check/reinstall: devp/reinstall
	@# Check there are no changes in platform files
	$(Q) REPLACED_MESSAGE="There are changes in platform files. Undo the changes in 'scripts/devp' folder." ${DEVP_SCRIPTS}/check-clean-working-tree.sh

.PHONY: devp/ci/check/format-go
devp/ci/check/format-go: devp/format-go
	@# Check there is no changes after devp/format-go
	$(Q) ${DEVP_SCRIPTS}/check-clean-working-tree.sh "make devp/format-go"
