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

feat(cli): add support for pug-lint #721

Merged
merged 1 commit into from
Feb 23, 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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ mdsf init

<!-- START_SECTION:supported-tools -->

`mdsf` currently supports 253 tools. Feel free to open an issue/pull-request if your favorite tool/command is missing! 😃
`mdsf` currently supports 254 tools. Feel free to open an issue/pull-request if your favorite tool/command is missing! 😃

| Name | Description | Categories | Languages |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------- |
Expand Down Expand Up @@ -512,6 +512,7 @@ mdsf init
| [prisma](https://www.prisma.io/docs/orm/tools/prisma-cli) | Commands for interacting with the prisma ORM | `formatter` | `prisma` |
| [protolint](https://github.com/yoheimuta/protolint) | A pluggable linter and fixer to enforce Protocol Buffer style and conventions | `linter` | `protobuf` |
| [ptop](https://www.freepascal.org/tools/ptop.html) | Free Pascal source formatter | `formatter` | `pascal` |
| [pug-lint](https://github.com/pugjs/pug-lint) | An unopinionated and configurable linter and style checker for Pug | `linter` | `pug` |
| [puppet-lint](https://github.com/puppetlabs/puppet-lint) | Check that your Puppet manifests conform to the style guide | `linter` | `puppet` |
| [purs-tidy](https://github.com/natefaubion/purescript-tidy) | PureScript code formatter | `formatter` | `purescript` |
| [purty](https://gitlab.com/joneshf/purty) | PureScript pretty-printer | `formatter` | `purescript` |
Expand Down Expand Up @@ -604,7 +605,7 @@ mdsf init

<!-- START_SECTION:supported-commands -->

`mdsf` currently supports 269 commands. Feel free to open an issue/pull-request if your favorite tool/command is missing! 😃
`mdsf` currently supports 270 commands. Feel free to open an issue/pull-request if your favorite tool/command is missing! 😃

| Name | Command |
| ------------------------ | --------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -787,6 +788,7 @@ mdsf init
| `prisma:format` | `prisma format --schema={$PATH_STRING}` |
| `protolint` | `protolint lint -fix $PATH` |
| `ptop` | `ptop $PATH $PATH` |
| `pug-lint` | `pug-lint $PATH` |
| `puppet-lint` | `puppet-lint --fix $PATH` |
| `purs-tidy` | `purs-tidy format-in-place $PATH` |
| `purty` | `purty --write $PATH` |
Expand Down
11 changes: 11 additions & 0 deletions mdsf/src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ pub mod prettypst;
pub mod prisma_format;
pub mod protolint;
pub mod ptop;
pub mod pug_lint;
pub mod puppet_lint;
pub mod purs_tidy;
pub mod purty;
Expand Down Expand Up @@ -1707,6 +1708,14 @@ pub enum Tooling {
/// `ptop $PATH $PATH`
Ptop,

#[serde(rename = "pug-lint")]
/// An unopinionated and configurable linter and style checker for Pug
///
/// [https://github.com/pugjs/pug-lint](https://github.com/pugjs/pug-lint)
///
/// `pug-lint $PATH`
PugLint,

#[serde(rename = "puppet-lint")]
/// Check that your Puppet manifests conform to the style guide
///
Expand Down Expand Up @@ -2628,6 +2637,7 @@ impl Tooling {
Self::PrismaFormat => (&prisma_format::COMMANDS, prisma_format::set_args),
Self::Protolint => (&protolint::COMMANDS, protolint::set_args),
Self::Ptop => (&ptop::COMMANDS, ptop::set_args),
Self::PugLint => (&pug_lint::COMMANDS, pug_lint::set_args),
Self::PuppetLint => (&puppet_lint::COMMANDS, puppet_lint::set_args),
Self::PursTidy => (&purs_tidy::COMMANDS, purs_tidy::set_args),
Self::Purty => (&purty::COMMANDS, purty::set_args),
Expand Down Expand Up @@ -2911,6 +2921,7 @@ impl AsRef<str> for Tooling {
Self::PrismaFormat => "prisma_format",
Self::Protolint => "protolint",
Self::Ptop => "ptop",
Self::PugLint => "pug_lint",
Self::PuppetLint => "puppet_lint",
Self::PursTidy => "purs_tidy",
Self::Purty => "purty",
Expand Down
18 changes: 18 additions & 0 deletions mdsf/src/tools/pug_lint.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
///
/// THIS FILE IS GENERATED USING CODE - DO NOT EDIT MANUALLY
///
use crate::runners::CommandType;

#[inline]
pub fn set_args(
mut cmd: std::process::Command,
file_path: &std::path::Path,
) -> std::process::Command {
cmd.arg(file_path);
cmd
}

pub const COMMANDS: [CommandType; 1] = [CommandType::Direct("pug-lint")];

#[cfg(test)]
mod test_pug_lint {}
5 changes: 5 additions & 0 deletions schemas/v0.5.3-dev/mdsf.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,11 @@
"type": "string",
"enum": ["ptop"]
},
{
"description": "An unopinionated and configurable linter and style checker for Pug\n\n[https://github.com/pugjs/pug-lint](https://github.com/pugjs/pug-lint)\n\n`pug-lint $PATH`",
"type": "string",
"enum": ["pug-lint"]
},
{
"description": "Check that your Puppet manifests conform to the style guide\n\n[https://github.com/puppetlabs/puppet-lint](https://github.com/puppetlabs/puppet-lint)\n\n`puppet-lint --fix $PATH`",
"type": "string",
Expand Down
14 changes: 14 additions & 0 deletions tools/pug-lint/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "../tool.schema.json",
"binary": "pug-lint",
"categories": ["linter"],
"commands": {
"": {
"arguments": ["$PATH"]
}
},
"description": "An unopinionated and configurable linter and style checker for Pug",
"homepage": "https://github.com/pugjs/pug-lint",
"languages": ["pug"],
"packages": {}
}
Loading