tfa-next: add static and lint checks

    1. Copyright exists on new files (error) + are correctly dated
       (warn)
    2. Line endings are Unix style, not Windows
    3. Cargo fmt --check - returns error if format issues found
    4. Clippy - various lints, both error + warn

Checks 1+2 call the pre-existing scripts in the static-checks/ dir, 3+4
are newly implemented checks in the next-checks/ dir.

clippy is currently set to only fail on DENY level errors[1]. There are
many warnings currently in the prototype RF-A, however in future we
should look to enable the '-Dwarnings' flag to turn WARN into fail.

clippy is set to run twice for simplicity: once for fvp, once for qemu.
The '--all-features' flag to clippy exists and would allow a single run,
however rust/build.rs contains a check to ensure the Rust flag `--cfg
platform=${PLAT}` is set (where $PLAT is an env var passed to the make
command). This would mean some additional work is required to enable
'--all-features'. This work should be considered for future scaling to
additional platforms however is beyond the scope of this patch.

1: https://rust-lang.github.io/rust-clippy/master/index.html?levels=deny

Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Change-Id: I31876f2d547d90c6d255ab1ebe8f8b205a6951fe
diff --git a/script/static-checks/static-checks-coding-style-line-endings.sh b/script/static-checks/static-checks-coding-style-line-endings.sh
index 9c0cda7..66763bc 100755
--- a/script/static-checks/static-checks-coding-style-line-endings.sh
+++ b/script/static-checks/static-checks-coding-style-line-endings.sh
@@ -22,7 +22,7 @@
     shopt -s globstar
     parent=$(get_merge_base)
     git diff $parent..HEAD --no-ext-diff --unified=0 --exit-code -a \
-      --no-prefix **/*.{S,c,h,i,dts,dtsi,rst,mk} Makefile | \
+      --no-prefix **/*.{S,c,h,i,dts,dtsi,rst,mk,rs} Makefile | \
       awk '/^\+/ && /\r$/' &> "$LOG_FILE"
 else
   # For all the source and doc files
@@ -37,6 +37,7 @@
       -name '*.rst' -or \
       -name 'Makefile' -or \
       -name '*.mk' \
+      -name '*.rs' \
   -\) -exec grep --files-with-matches $'\r$' {} \; &> "$LOG_FILE"
 fi