From 24ce47014de3d4c9a5342785e4f62d5cdf8f771a Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Mon, 24 Aug 2020 21:40:02 -0300 Subject: [PATCH] Adding C# lint --- lib/linter.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/linter.sh b/lib/linter.sh index 1475c8f6..827e6498 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -177,6 +177,7 @@ VALIDATE_BASH="${VALIDATE_BASH}" # Boolean t VALIDATE_CLOUDFORMATION="${VALIDATE_CLOUDFORMATION}" # Boolean to validate language VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language VALIDATE_COFFEE="${VALIDATE_COFFEE}" # Boolean to validate language +VALIDATE_CSHARP="${VALIDATE_CSHARP}" # Boolean to validate language VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language VALIDATE_DART="${VALIDATE_DART}" # Boolean to validate language VALIDATE_DOCKERFILE="${VALIDATE_DOCKERFILE}" # Boolean to validate language @@ -1418,6 +1419,17 @@ if [ "${VALIDATE_COFFEE}" == "true" ]; then LintCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "${FILE_ARRAY_COFFEESCRIPT[@]}" fi +################## +# CSHARP LINTING # +################## +if [ "${VALIDATE_CSHARP}" == "true" ]; then + ######################### + # Lint the C# files # + ######################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "CSHARP" "dotnet-format" "dotnet-format --check --files .*\.\(cs\)\$" "${FILE_ARRAY_CSHARP[@]}" +fi + ############### # CSS LINTING # ###############