Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add empty tests array to command if not set #865

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. Dates are d

#### [Unreleased](https://github.com/hougesen/mdsf/compare/v0.8.2...HEAD)

- test(tools): add test for misspell [`#864`](https://github.com/hougesen/mdsf/pull/864)
- test(tools): add test for nginxfmt [`#863`](https://github.com/hougesen/mdsf/pull/863)
- test(tools): validate nginxbeautifier [`#862`](https://github.com/hougesen/mdsf/pull/862)
- test: validate coffeelint [`#861`](https://github.com/hougesen/mdsf/pull/861)
Expand Down
2 changes: 1 addition & 1 deletion codegen/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct ToolCommand {
#[serde(default, skip_serializing_if = "is_false")]
pub stdin: bool,

#[serde(default, skip_serializing_if = "Vec::is_empty")]
#[serde(default)]
pub tests: Vec<ToolCommandTest>,
}

Expand Down
3 changes: 2 additions & 1 deletion tools/ameba/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--fix", "$PATH"]
"arguments": ["--fix", "$PATH"],
"tests": []
}
},
"description": "A static code analysis tool for Crystal",
Expand Down
3 changes: 2 additions & 1 deletion tools/ansible-lint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "ansible-lint checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you",
Expand Down
3 changes: 2 additions & 1 deletion tools/asmfmt/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["-w", "$PATH"]
"arguments": ["-w", "$PATH"],
"tests": []
}
},
"description": "Go Assembler Formatter",
Expand Down
3 changes: 2 additions & 1 deletion tools/astyle/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["--quiet", "$PATH"]
"arguments": ["--quiet", "$PATH"],
"tests": []
}
},
"description": "A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code",
Expand Down
3 changes: 2 additions & 1 deletion tools/autocorrect/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["spell-check"],
"commands": {
"": {
"arguments": ["--fix", "$PATH"]
"arguments": ["--fix", "$PATH"],
"tests": []
}
},
"description": "A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK (Chinese, Japanese, Korean)",
Expand Down
3 changes: 2 additions & 1 deletion tools/beancount-black/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "Opinionated code formatter, just like Python's black code formatter but for Beancount",
Expand Down
3 changes: 2 additions & 1 deletion tools/bibtex-tidy/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["-m", "$PATH"]
"arguments": ["-m", "$PATH"],
"tests": []
}
},
"description": "Cleaner and Formatter for BibTeX files",
Expand Down
3 changes: 2 additions & 1 deletion tools/bicep/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"format": {
"arguments": ["format", "$PATH"]
"arguments": ["format", "$PATH"],
"tests": []
}
},
"description": "Bicep is a declarative language for describing and deploying Azure resources",
Expand Down
3 changes: 2 additions & 1 deletion tools/bpfmt/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["-w", "$PATH"]
"arguments": ["-w", "$PATH"],
"tests": []
}
},
"description": "A formatter for Blueprint files",
Expand Down
3 changes: 2 additions & 1 deletion tools/brighterscript-formatter/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["$PATH", "--write"]
"arguments": ["$PATH", "--write"],
"tests": []
}
},
"description": "A code formatter for BrightScript and BrighterScript",
Expand Down
3 changes: 2 additions & 1 deletion tools/brittany/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["--write-mode=inplace", "$PATH"]
"arguments": ["--write-mode=inplace", "$PATH"],
"tests": []
}
},
"description": "A Haskell source code formatter",
Expand Down
3 changes: 2 additions & 1 deletion tools/bslint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--fix", "$PATH"]
"arguments": ["--fix", "$PATH"],
"tests": []
}
},
"description": "A linter for BrightScript and BrighterScript",
Expand Down
3 changes: 2 additions & 1 deletion tools/buf/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"lint": {
"arguments": ["lint", "$PATH"],
"description": "Lint Protobuf files",
"homepage": "https://buf.build/docs/lint/overview/"
"homepage": "https://buf.build/docs/lint/overview/",
"tests": []
}
},
"description": "The best way of working with Protocol Buffers",
Expand Down
3 changes: 2 additions & 1 deletion tools/buildifier/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "A bazel BUILD file formatter and",
Expand Down
3 changes: 2 additions & 1 deletion tools/cabal-fmt/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["--inplace", "$PATH"]
"arguments": ["--inplace", "$PATH"],
"tests": []
}
},
"description": "An experiment of formatting .cabal files",
Expand Down
3 changes: 2 additions & 1 deletion tools/cabal-prettify/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "Prettify your Cabal package configuration files",
Expand Down
3 changes: 2 additions & 1 deletion tools/caddy/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"fmt": {
"arguments": ["fmt", "$PATH", "-w"],
"description": "Formats or prettifies a Caddyfile",
"homepage": "https://caddyserver.com/docs/command-line#caddy-fmt"
"homepage": "https://caddyserver.com/docs/command-line#caddy-fmt",
"tests": []
}
},
"description": "Formats or prettifies a Caddyfile",
Expand Down
3 changes: 2 additions & 1 deletion tools/caramel/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"commands": {
"fmt": {
"arguments": ["fmt", "$PATH"],
"description": "Format Caramel code"
"description": "Format Caramel code",
"tests": []
}
},
"description": "Formatter for the Caramel programming language",
Expand Down
3 changes: 2 additions & 1 deletion tools/cfn-lint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "CloudFormation Linter",
Expand Down
3 changes: 2 additions & 1 deletion tools/checkmake/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "Experimental linter/analyzer for Makefiles",
Expand Down
3 changes: 2 additions & 1 deletion tools/clang-tidy/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--fix", "$PATH"]
"arguments": ["--fix", "$PATH"],
"tests": []
}
},
"description": "clang-tidy is a clang-based C++ “linter” tool",
Expand Down
3 changes: 2 additions & 1 deletion tools/clj-kondo/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--lint", "$PATH"]
"arguments": ["--lint", "$PATH"],
"tests": []
}
},
"description": "Static analyzer and linter for Clojure code that sparks joy",
Expand Down
3 changes: 2 additions & 1 deletion tools/cljfmt/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"fix": {
"arguments": ["fix", "$PATH"]
"arguments": ["fix", "$PATH"],
"tests": []
}
},
"description": "A tool for formatting Clojure code",
Expand Down
3 changes: 2 additions & 1 deletion tools/cmake-format/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["-i", "$PATH"]
"arguments": ["-i", "$PATH"],
"tests": []
}
},
"description": "cmake-format can format your listfiles nicely so that they don't look like crap",
Expand Down
3 changes: 2 additions & 1 deletion tools/cmake-lint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "Lint CMake files",
Expand Down
3 changes: 2 additions & 1 deletion tools/codeql/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"query:format": {
"arguments": ["query", "format", "-i", "$PATH"],
"description": "Format queries and libraries with CodeQL",
"homepage": "https://docs.github.com/en/code-security/codeql-cli/codeql-cli-manual/query-format"
"homepage": "https://docs.github.com/en/code-security/codeql-cli/codeql-cli-manual/query-format",
"tests": []
}
},
"description": "Format queries and libraries with CodeQL",
Expand Down
3 changes: 2 additions & 1 deletion tools/codespell/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["spell-check"],
"commands": {
"": {
"arguments": ["$PATH", "--check-hidden", "--write-changes"]
"arguments": ["$PATH", "--check-hidden", "--write-changes"],
"tests": []
}
},
"description": "Check code for common misspellings",
Expand Down
3 changes: 2 additions & 1 deletion tools/cppcheck/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
"arguments": ["$PATH"],
"tests": []
}
},
"description": "Cppcheck is a static analysis tool for C/C++ code",
Expand Down
3 changes: 2 additions & 1 deletion tools/cpplint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--quiet", "$PATH"]
"arguments": ["--quiet", "$PATH"],
"tests": []
}
},
"description": "Static code checker for C++",
Expand Down
3 changes: 2 additions & 1 deletion tools/crlfmt/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["formatter"],
"commands": {
"": {
"arguments": ["-w", "$PATH"]
"arguments": ["-w", "$PATH"],
"tests": []
}
},
"description": "Formatter for CockroachDB's additions to the Go style guide",
Expand Down
3 changes: 2 additions & 1 deletion tools/csslint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["--quiet", "$PATH"]
"arguments": ["--quiet", "$PATH"],
"tests": []
}
},
"description": "Automated linting of Cascading Stylesheets",
Expand Down
3 changes: 2 additions & 1 deletion tools/curlylint/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["-q", "$PATH"]
"arguments": ["-q", "$PATH"],
"tests": []
}
},
"description": "Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid",
Expand Down
3 changes: 2 additions & 1 deletion tools/d2/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"commands": {
"fmt": {
"arguments": ["fmt", "$PATH"],
"description": "Format d2 code"
"description": "Format d2 code",
"tests": []
}
},
"description": "A modern language that turns text to diagrams",
Expand Down
3 changes: 2 additions & 1 deletion tools/dart/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"fix": {
"arguments": ["fix", "--apply", "$PATH"],
"description": "Fixes errors in dart code",
"homepage": "https://dart.dev/tools/dart-fix"
"homepage": "https://dart.dev/tools/dart-fix",
"tests": []
},
"format": {
"arguments": ["format", "$PATH"],
Expand Down
6 changes: 4 additions & 2 deletions tools/dcm/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"fix": {
"arguments": ["fix", "$PATH"],
"description": "Fixes issues produced by dcm analyze, dcm check-unused-code, dcm check-unused-files or dcm check-dependencies commands",
"homepage": "https://dcm.dev/docs/cli/formatting/fix/"
"homepage": "https://dcm.dev/docs/cli/formatting/fix/",
"tests": []
},
"format": {
"arguments": ["format", "$PATH"],
"description": "Formats dart files",
"homepage": "https://dcm.dev/docs/cli/formatting/format/"
"homepage": "https://dcm.dev/docs/cli/formatting/format/",
"tests": []
}
},
"description": "Code Quality Tool for Flutter Developers",
Expand Down
3 changes: 2 additions & 1 deletion tools/deadnix/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"categories": ["linter"],
"commands": {
"": {
"arguments": ["-q", "--edit", "$PATH"]
"arguments": ["-q", "--edit", "$PATH"],
"tests": []
}
},
"description": "Scan Nix files for dead code",
Expand Down
3 changes: 2 additions & 1 deletion tools/deno/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
},
"lint": {
"arguments": ["lint", "--fix", "$PATH"],
"homepage": "https://docs.deno.com/runtime/reference/cli/lint/"
"homepage": "https://docs.deno.com/runtime/reference/cli/lint/",
"tests": []
}
},
"description": "Formatter and linter for JavaScript and TypeScript",
Expand Down
Loading
Loading