--- /dev/null
+[codespell]
+skip = ./bin,./docs-xml/archives,./docs-xml/manpages/vfs_fruit.8.xml,./docs-xml/smbdotconf/browse/preferredmaster.xml,./lib/ldb/ldb_sqlite3/trees.ps,./libcli/util/ntstatus.h,./libcli/util/hresult.c,./python/samba/tests/blackbox/testdata,./source3/include/MacExtensions.h,./source3/selftest/ktest-krb5_ccache-2.txt,./source4/setup/display-specifiers,./source4/ldap_server/devdocs,./source4/selftest/provisions,./source4/setup/adprep/WindowsServerDocs,./source4/setup/display-specifiers,./source4/torture/vfs/fruit.c,./testdata,./third_party,*.IBM-DS,*.config,*.diff,*.dump,*.ldif,*.ldf,*.pdml,*.pem,*.po,*.schema
+ignore-regex = \\[t]
+ignore-words = .codespellignore
--- /dev/null
+#!/bin/bash
+#
+# Check code spelling
+
+if [ $# -lt 1 ]; then
+ echo "Usage: $(basename "${0}") DIR"
+ exit 1
+fi
+
+DIR="${1}"
+
+codespell "${DIR}"
+ret=$?
+
+if [ ${ret} -ne 0 ]; then
+ echo
+ echo "Fix code spelling issues. If it detected false positives" \
+ "please update .codespellignore."
+fi
+
+exit ${ret}