From add83739a71b9e3e2b6d251f59822d683a3a8e27 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 25 Aug 2020 13:07:44 -0500 Subject: [PATCH] adding test folders --- .automation/test/csharp/README.md | 19 ++++++++++++++++ .automation/test/csharp/csharp_bad_01.cs | 9 ++++++++ .automation/test/csharp/csharp_good_01.cs | 22 +++++++++++++++++++ .../reports/expected-CSHARP.tap.ignored | 7 ++++++ lib/worker.sh | 1 + 5 files changed, 58 insertions(+) create mode 100644 .automation/test/csharp/README.md create mode 100644 .automation/test/csharp/csharp_bad_01.cs create mode 100644 .automation/test/csharp/csharp_good_01.cs create mode 100644 .automation/test/csharp/reports/expected-CSHARP.tap.ignored diff --git a/.automation/test/csharp/README.md b/.automation/test/csharp/README.md new file mode 100644 index 00000000..7c284115 --- /dev/null +++ b/.automation/test/csharp/README.md @@ -0,0 +1,19 @@ +# CSS Test Cases + +This folder holds the test cases for **CSS**. + +## Additional Docs + +No Additional information is needed for this test case. + +## Good Test Cases + +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. + +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases + +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. + +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/csharp/csharp_bad_01.cs b/.automation/test/csharp/csharp_bad_01.cs new file mode 100644 index 00000000..6ae90d7e --- /dev/null +++ b/.automation/test/csharp/csharp_bad_01.cs @@ -0,0 +1,9 @@ +/* Bad */ +/* Multi-line */ +/* Comment */ +.selector-3[type="text"] { + background: linear-gradient(#FFFFFF, rgba(0, 0, 0, 0.8)); + box-sizing: border-box; + display: block; + color: #AAAAAA; +} diff --git a/.automation/test/csharp/csharp_good_01.cs b/.automation/test/csharp/csharp_good_01.cs new file mode 100644 index 00000000..a126e5b2 --- /dev/null +++ b/.automation/test/csharp/csharp_good_01.cs @@ -0,0 +1,22 @@ +/** + * Multi-line comment + */ + +.selector-1, +.selector-2, +.selector-3[type="text"] { + background: linear-gradient(#fff, rgba(0, 0, 0, 0.8)); + box-sizing: border-box; + display: block; + color: #333; +} + +.selector-a, +.selector-b:not(:first-child) { + padding: 10px !important; + top: calc(calc(1em * 2) / 3); +} + +.selector-x { width: 10%; } +.selector-y { width: 20%; } +.selector-z { width: 30%; } diff --git a/.automation/test/csharp/reports/expected-CSHARP.tap.ignored b/.automation/test/csharp/reports/expected-CSHARP.tap.ignored new file mode 100644 index 00000000..98d94702 --- /dev/null +++ b/.automation/test/csharp/reports/expected-CSHARP.tap.ignored @@ -0,0 +1,7 @@ +TAP version 13 +1..2 +not ok 1 - css_bad_01.css + --- + message: \ncss/css_bad_01.css\n 2 1 ✖ Expected empty line before comment comment-empty-line-before\n 3 1 ✖ Expected empty line before comment comment-empty-line-before\n 5 5 ✖ Expected indentation of 2 spaces indentation \n 5 33 ✖ Expected "#FFFFFF" to be "#ffffff" color-hex-case \n 5 33 ✖ Expected "#FFFFFF" to be "#FFF" color-hex-length \n 6 5 ✖ Expected indentation of 2 spaces indentation \n 7 5 ✖ Expected indentation of 2 spaces indentation \n 8 5 ✖ Expected indentation of 2 spaces indentation \n 8 12 ✖ Expected "#AAAAAA" to be "#aaaaaa" color-hex-case \n 8 12 ✖ Expected "#AAAAAA" to be "#AAA" color-hex-length\n + ... +ok 2 - css_good_01.css diff --git a/lib/worker.sh b/lib/worker.sh index e2afbee3..4757931b 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -611,6 +611,7 @@ function RunTestCases() { TestCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" ".*\.\(json\|yml\|yaml\)\$" "cloudformation" TestCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "clojure" TestCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "coffeescript" + TestCodebase "CSHARP" "dotnet-format" "dotnet-format --check --include .*\.\(cs\)\$" "csharp" TestCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\|scss\|sass\)\$" "css" TestCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "dart" TestCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c ${DOCKERFILE_LINTER_RULES}" ".*\(Dockerfile\)\$" "docker"