Check the word order of the dictionary file

Change-Id: I2903c5f5a6715425ed192844a869640f439f5eb5
diff --git a/.reuse/dep5 b/.reuse/dep5
index e778719..3998153 100644
--- a/.reuse/dep5
+++ b/.reuse/dep5
@@ -1,5 +1,5 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
-Files: VERSION images/* _static/*
+Files: VERSION images/* _static/* dict.txt
 Copyright: 2021 Open Networking Foundation
 License: Apache-2.0
diff --git a/Makefile b/Makefile
index 0cdbd72..79f2f4b 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@
 # name of python virtualenv that is used to run commands
 VENV_NAME      := venv-docs
 
-.PHONY: help test lint doc8 reload Makefile prep
+.PHONY: help test lint doc8 reload Makefile prep format format-dict
 
 # Put it first so that "make" without argument is like "make help".
 help: $(VENV_NAME)
@@ -34,7 +34,7 @@
   sphinx-reload $(SOURCEDIR)
 
 # lint and link verification. linkcheck is part of sphinx
-test: lint spelling linkcheck
+test: lint spelling linkcheck dict-check
 
 lint: doc8
 
@@ -43,6 +43,16 @@
   doc8 --max-line-length 119 \
   $$(find . -name \*.rst ! -path "*venv*" ! -path "*vendor*" ! -path "*repos*" )
 
+# Words in dict.txt must be in the correct alphabetical order and must not duplicated.
+dict-check: format-dict
+	@git update-index --refresh
+
+format: format-dict
+
+format-dict:
+	@cat dict.txt | sort -u > /tmp/sorted.txt
+	@mv /tmp/sorted.txt dict.txt
+
 license: $(VENV_NAME)
 	source $</bin/activate ; set -u ;\
   reuse --version ;\
diff --git a/dict.txt b/dict.txt
index 21a62e8..cb9efc3 100644
--- a/dict.txt
+++ b/dict.txt
@@ -1,8 +1,3 @@
-# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-# SPDX-License-Identifier: Apache-2.0
-
-# Please keep lines in ascending case-sensitive order, so it's easier to spot duplicates
-# during merge conflict resolution.
 ACL
 Aether
 Analytics
@@ -13,14 +8,15 @@
 DDoS
 Edgecore
 Fluentbit
-GbE
 GPP
+GbE
 Gerrit
 Grafana
 IPv
 Inband
 Inventec
 IoT
+Karaf
 Kibana
 Kubernetes
 Makefile
@@ -91,7 +87,6 @@
 ip
 jitter
 json
-Karaf
 keepalives
 lifecycle
 linecard