check-exercises: Require presence of src/lib.rs
As done in
Example of a failing build because of no src/lib.rs:
@@ -31,7 +31,13 @@ for exercise in $files; do
# Run in subshell to change workdir without affecting current workdir.
(
cd $workdir
- [ -d src ] || mkdir src
+
+ if [ ! -f src/lib.rs ]; then
+ # https://github.com/exercism/rust/pull/270
+ echo "$exercise is missing a src/lib.rs; please create one (an empty file is acceptable)"
+ exitcode=1
+ fi
+
cp example.rs src/lib.rs
# Overwrite empty Cargo.toml if an example specific file exists
