CPPLINT: Add lint configuration

Borrowed in part from the kernel repository.

TEST=cros lint is happier

Change-Id: Icb41a04dfd4c289187975bc59505c78c26b56f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashmap/+/5034762
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
diff --git a/CPPLINT.cfg b/CPPLINT.cfg
new file mode 100644
index 0000000..527b7aa
--- /dev/null
+++ b/CPPLINT.cfg
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+# Copyright 2023 Google LLC.
+set noparent
+# We run "cros lint" on various files. For "C" files it runs a very simple
+# lint, but for C++ files it runs the chromium "cpplint.py" from depot_tools.
+# Both C and C++ header files end with ".h", so it ends up calling "cpplint.py"
+# for those as well.
+# This is a third_party project, so applying all Chromium styles to it is not
+# always best. Let's disable a few to make our linted lives easier.
+# whitespace/tab - Warns about indenting with tabs.
+# runtime/int - Warns about using non-sized int types.
+# readability/casting - Warns about C (vs C++) style casting.
+# build/header_guard - Wants header guide to use C++ style comments "//".