### Enforce VHDL Style with VhdlStyleGuide Source: https://docs.rs/mdsf/latest/mdsf/tools/enum vhdl-style-guide is a tool for enforcing style guide rules in VHDL code. The -f flag specifies the files to process, and --fix attempts to correct style issues. Ensure vsg is installed. ```shell vsg -f $PATH --fix ``` -------------------------------- ### Format Code with Topiary Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Topiary is a uniform formatter for simple languages within the Tree-sitter ecosystem. This command formats code files. Ensure Topiary is installed. ```shell topiary format $PATH ``` -------------------------------- ### Get Haskell code suggestions with Hlint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Hlint provides suggestions for improving Haskell source code, identifying potential optimizations and style improvements. ```bash hlint $PATH ``` -------------------------------- ### Lint Vim Script with Neovim Support (Vint) Source: https://docs.rs/mdsf/latest/mdsf/tools/enum This command uses Vint with the --enable-neovim flag to lint Vim script files, specifically including Neovim-specific configurations. Ensure vint is installed. ```shell vint --enable-neovim $PATH ``` -------------------------------- ### Format JavaScript with Standardjs and Semistandard Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Standardjs and Semistandard are JavaScript style guides, linters, and formatters. They can fix code and process input from stdin. ```javascript standard --fix --stdin ``` ```javascript semistandard --fix --stdin ``` -------------------------------- ### Format OpenTofu Configuration with tofu fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum The tofu fmt command rewrites OpenTofu configuration files to a canonical format and style. The -write=true flag ensures the changes are saved. Ensure OpenTofu is installed. ```shell tofu fmt -write=true $PATH ``` -------------------------------- ### Lint Vim Script with Vint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Vint is a linter for Vim script files. This command applies linting rules to the specified Vim script files. Ensure vint is installed. ```shell vint $PATH ``` -------------------------------- ### Lint OpenAPI Specs with VacuumLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Vacuum is a fast linter and quality analysis tool for OpenAPI 3 and OpenAPI 2 (Swagger) specifications. This command lints the specified OpenAPI files. Ensure vacuum is installed. ```shell vacuum lint $PATH ``` -------------------------------- ### Lint SystemVerilog with Svlint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Svlint is a linter for SystemVerilog code. This command applies linting rules to the specified SystemVerilog files. Make sure svlint is installed and in your PATH. ```shell svlint $PATH ``` -------------------------------- ### Format Uiua Code with UiuaFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum UiuaFmt is a formatter for the Uiua stack-based array programming language. This command formats Uiua files. Ensure uiua is installed. ```shell uiua fmt $PATH ``` -------------------------------- ### Format HTML with SuperhtmlFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum SuperhtmlFmt is an HTML Language Server and Templating Language Library that includes formatting capabilities. Use this command to format HTML files specified by the path. Ensure SuperhtmlFmt is installed. ```shell superhtml fmt $PATH ``` -------------------------------- ### Format Typst Code with typstfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Typstfmt is a basic formatter for the Typst language. This command formats Typst files. Ensure typstfmt is installed. ```shell typstfmt $PATH ``` -------------------------------- ### Format Typst Code with Typstyle Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Typstyle is a beautiful and reliable Typst code formatter. The -i flag formats the files in place. Ensure typstyle is installed. ```shell typstyle -i $PATH ``` -------------------------------- ### Format Swift Code with swiftformat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Swiftformat is a command-line tool and Xcode Extension for formatting Swift code. This command formats Swift files quietly. Ensure swiftformat is installed. ```shell swiftformat --quiet $PATH ``` -------------------------------- ### Format Swift Code with swift-format Source: https://docs.rs/mdsf/latest/mdsf/tools/enum SwiftFormat is a tool for formatting Swift source code. This command formats Swift files in place. Ensure swift-format is installed and available in your PATH. ```shell swift-format --in-place $PATH ``` -------------------------------- ### Lint Puppet Manifests with puppet-lint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum puppet-lint checks Puppet manifests to ensure they conform to a specified style guide. It can also apply fixes to the manifests. ```shell puppet-lint --fix $PATH ``` -------------------------------- ### Format TOML with Taplo Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Taplo is a TOML toolkit written in Rust. This command formats TOML files specified by the path. Ensure Taplo is installed. ```shell taplo format $PATH ``` -------------------------------- ### Format LaTeX with TexFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Tex-fmt is an extremely fast LaTeX formatter written in Rust. This command formats LaTeX files specified by the path. Ensure tex-fmt is installed. ```shell tex-fmt $PATH ``` -------------------------------- ### Format Java code with GoogleJavaFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum GoogleJavaFormat reformats Java source code to strictly adhere to the Google Java Style Guide. ```bash google-java-format -i $PATH ``` -------------------------------- ### Format Wa Code with WaFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum WaFmt is used to format Wa source code. This command applies formatting rules to the specified Wa files. Ensure the wa-lang toolchain is installed. ```shell wa fmt $PATH ``` -------------------------------- ### Lint TOML with TombiLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TombiLint is a TOML formatter and linter. This command applies linting rules to TOML files specified by the path. Ensure Tombi is installed. ```shell tombi lint $PATH ``` -------------------------------- ### Format Verus Code with Verusfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Verusfmt is an opinionated formatter for the Verus language. This command formats Verus code files. Ensure verusfmt is installed. ```shell verusfmt $PATH ``` -------------------------------- ### Format Python with Ufmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Ufmt provides safe, atomic formatting for Python projects using tools like black and usort. This command formats Python files. Ensure ufmt is installed. ```shell ufmt format $PATH ``` -------------------------------- ### Format Templ Files with TemplFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TemplFmt is a tool for the Templ template language. Use this command to format Templ files. Ensure templ is installed and in your PATH. ```shell templ fmt $PATH ``` -------------------------------- ### Lint Twig Files with Twigcs Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Twigcs is described as the missing checkstyle for Twig. This command applies linting to Twig files. Ensure twigcs is installed. ```shell twigcs $PATH ``` -------------------------------- ### Check Prose Errors with Textlint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Textlint is a tool to check input for prose errors. This command runs textlint on the specified files. Ensure Textlint is installed. ```shell textlint $PATH ``` -------------------------------- ### Sort and Format TOML with TomlSort Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TomlSort is a command-line utility to sort and format TOML files. The '-i' flag sorts the file in place. Ensure toml-sort is installed. ```shell toml-sort -i $PATH ``` -------------------------------- ### Format Laravel Code with TlintFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TlintFormat enforces Laravel conventions and formats code. This command formats the specified files according to Laravel conventions. Ensure tlint is installed. ```shell tlint format $PATH ``` -------------------------------- ### Format CUE code with CueFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CueFmt is a tool for formatting CUE (CUE Understands Everything) configuration files. It ensures that CUE definitions and configurations are presented in a consistent and readable manner. The command takes the path to the CUE file(s). ```bash cue fmt $PATH ``` -------------------------------- ### Fix TypeScript with ts-standard Source: https://docs.rs/mdsf/latest/mdsf/tools/enum ts-standard provides a TypeScript style guide, linter, and formatter using StandardJS. The --fix flag automatically corrects code style issues. Ensure ts-standard is installed. ```shell ts-standard --fix $PATH ``` -------------------------------- ### Format Rust code with Rustfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Rustfmt is the official code formatter for Rust. It formats Rust code according to the official style guide, supporting specific editions. ```shell rustfmt --edition 2021 --quiet $PATH ``` -------------------------------- ### Format Python Code to PEP 8 with Autopep8 Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Autopep8 is a Python tool that automatically formats Python code to conform to the PEP 8 style guide. The `--in-place` flag modifies files directly. ```bash autopep8 --in-place $PATH ``` -------------------------------- ### Analyze and format Ruby code with Rubocop Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Rubocop is a Ruby static code analyzer and formatter based on the community Ruby style guide. It can fix layout issues and auto-correct code. ```shell rubocop --fix-layout --autocorrect --format quiet $PATH ``` -------------------------------- ### OwoColorize Trait Implementations (Rust) Source: https://docs.rs/mdsf/latest/mdsf/execution/enum Demonstrates various methods from the OwoColorize trait for styling text output with colors, including setting foreground and background colors. ```rust impl OwoColorize for D { fn fg(&self) -> FgColorDisplay<'_, C, Self> where C: Color; fn bg(&self) -> BgColorDisplay<'_, C, Self> where C: Color; fn black(&self) -> FgColorDisplay<'_, Black, Self>; fn on_black(&self) -> BgColorDisplay<'_, Black, Self>; fn red(&self) -> FgColorDisplay<'_, Red, Self>; } ``` -------------------------------- ### Format Elm Code with ElmFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum ElmFormat formats Elm source code according to the official Elm Style Guide. It applies formatting to the specified file path. ```bash elm-format --elm-version=0.19 --yes $PATH ``` -------------------------------- ### CacheEntry Methods Source: https://docs.rs/mdsf/latest/mdsf/caching/struct Details on the methods available for interacting with CacheEntry instances. ```APIDOC ## CacheEntry Methods ### `new` Creates a new `CacheEntry`. - **Method**: `pub fn new(config_hash: String, file_path: &Path, file_content: &str) -> Self` - **Parameters**: - `config_hash` (String) - The hash of the configuration used. - `file_path` (&Path) - The path to the file being cached. - `file_content` (&str) - The content of the file. ### `get` Retrieves the cached file content if available. - **Method**: `pub fn get(&self) -> Option` - **Returns**: `Option` - The cached content as a String, or None if not found. ### `set` Sets or updates the cached content for the entry. - **Method**: `pub fn set(&self, content: &str) -> Result<()>` - **Parameters**: - `content` (&str) - The new content to cache. - **Returns**: `Result<()>` - Ok(()) on success, or an error on failure. ``` -------------------------------- ### Format Terraform Configuration with terraform fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum The terraform fmt command rewrites Terraform configuration files to a canonical format and style. The -write=true flag ensures the changes are saved. Ensure Terraform is installed. ```shell terraform fmt -write=true $PATH ``` -------------------------------- ### Format CodeQL queries with CodeqlQueryFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CodeqlQueryFormat is a command-line tool provided by the CodeQL CLI for formatting CodeQL queries and libraries. It ensures that your CodeQL code adheres to a standard, readable format. The `-i` flag indicates in-place formatting. ```bash codeql query format -i $PATH ``` -------------------------------- ### Get CacheEntry Content in Rust Source: https://docs.rs/mdsf/latest/mdsf/caching/struct Retrieves the content stored within a CacheEntry. It returns an Option, indicating that the content might not always be present or available. ```rust pub fn get(&self) -> Option ``` -------------------------------- ### Format TOML with TombiFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TombiFormat is a TOML formatter and linter. This command formats TOML files. The '-' indicates standard input, but it can also take file paths. Ensure Tombi is installed. ```shell tombi format - ``` -------------------------------- ### TryInto Implementation Source: https://docs.rs/mdsf/latest/mdsf/cli/struct Provides functionality to attempt conversion from type `T` into another type `U`. ```APIDOC ### impl TryInto for T where U: TryFrom, #### type Error = >::Error ### Description Implements the `TryInto` trait, allowing for fallible conversion from type `T` into type `U`. The associated `Error` type is the same as the error type for `U`'s `TryFrom` implementation. ### Method #### fn try_into(self) -> Result>::Error> ### Description Performs the conversion from `self` (type `T`) into type `U`. Returns a `Result` indicating success with the converted value of type `U` or failure with an appropriate error. ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust // Example usage (assuming T and U are concrete types) // let t_value: T = ...; // let result: Result = t_value.try_into(); ``` ### Response #### Success Response - **Ok(U)** - The converted value of type `U`. #### Response Example ```json { "example": "Ok(converted_value_of_type_U)" } ``` ``` -------------------------------- ### Fix TSQL with Tsqllint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Tsqllint provides configurable linting for TSQL. The --fix flag attempts to automatically resolve linting issues. Ensure tsqllint is installed. ```shell tsqllint --fix $PATH ``` -------------------------------- ### TryFrom Implementation Source: https://docs.rs/mdsf/latest/mdsf/cli/struct Provides functionality to attempt conversion from one type `U` into another type `T`. ```APIDOC ### impl TryFrom for T where U: Into, #### type Error = Infallible ### Description Implements the `TryFrom` trait, allowing for fallible conversion from type `U` into type `T`. The `Error` type is `Infallible`, suggesting that when `U` can be converted into `T` via `Into`, the conversion is always successful. ### Method #### fn try_from(value: U) -> Result>::Error> ### Description Performs the conversion from `value` of type `U` into type `T`. Returns a `Result` which, given the `Infallible` error type, should always be `Ok(T)` if `U` implements `Into`. ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **value** (U) - The value to attempt to convert. ### Request Example ```rust // Example usage (assuming U and T are concrete types) // let u_value: U = ...; // let result: Result = T::try_from(u_value); ``` ### Response #### Success Response - **Ok(T)** - The converted value of type `T`. #### Response Example ```json { "example": "Ok(converted_value_of_type_T)" } ``` ``` -------------------------------- ### Format V Code with v fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum The v fmt command is used to format V code according to its canonical style. The -w flag writes the formatted code back to the file. Ensure the V compiler is installed. ```shell v fmt -w $PATH ``` -------------------------------- ### Format Veryl Code with veryl fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum veryl fmt is used to format Veryl code. This command applies formatting rules to Veryl files. Ensure the Veryl toolchain is installed. ```shell veryl fmt $PATH ``` -------------------------------- ### MdsfConfigRunners Field Descriptions Source: https://docs.rs/mdsf/latest/mdsf/config/struct Provides detailed explanations for each boolean field within MdsfConfigRunners. Each field indicates whether a specific package manager's execution method (e.g., `bunx $PACKAGE_NAME`, `deno run -A npm:$PACKAGE_NAME`) is supported. Defaults are typically false. ```markdown `bunx: bool` Whether to support running npm packages using `bunx $PACKAGE_NAME` Default: `false` `deno: bool` Whether to support running npm packages using `deno run -A npm:$PACKAGE_NAME` Default: `false` `dotnet: bool` Whether to support running dub packages using `dotnet $PACKAGE_NAME` Default: `false` `dub: bool` Whether to support running dub packages using `dub run $PACKAGE_NAME` Default: `false` `gem_exec: bool` Whether to support running ruby packages using `gem exec $PACKAGE_NAME` Default: `false` `npx: bool` Whether to support running npm packages using `npx $PACKAGE_NAME` Default: `false` `pipx: bool` Whether to support running pypi packages using `pipx run $PACKAGE_NAME` Default: `false` `pnpm: bool` Whether to support running npm packages using `pnpm dlx $PACKAGE_NAME` Default: `false` `uv: bool` Whether to support running pypi packages using `uv tool run $PACKAGE_NAME` Default: `false` `yarn: bool` Whether to support running npm packages using `yarn dlx $PACKAGE_NAME` Default: `false` ``` -------------------------------- ### Format justfiles with Just Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Just is a formatter for justfiles. The command uses --fmt to format, --unstable for potentially experimental features, and specifies the justfile path. ```shell just --fmt --unstable --justfile $PATH ``` -------------------------------- ### Format Fortran Source Code with Wfindent Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Wfindent is a tool designed to indent and optionally convert Fortran program sources. It helps maintain consistent code style in Fortran projects. Usage involves providing the path to the Fortran files. ```shell wfindent $PATH ``` -------------------------------- ### Format Caramel code with CaramelFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CaramelFmt is a tool specifically designed for formatting Caramel code. It ensures that Caramel source files adhere to a predefined style guide, improving readability and maintainability. The command takes the file path as an argument. ```bash caramel fmt $PATH ``` -------------------------------- ### Format Lua Code with Stylua Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Stylua is an opinionated Lua code formatter. It takes a file path as input and formats the Lua code in place. Ensure Stylua is installed and accessible in your PATH. ```shell stylua --verify $PATH ``` -------------------------------- ### Faster Golint Replacement with revive Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Revive is a faster, stricter, more configurable, and extensible drop-in replacement for golint. It analyzes Go code files specified by path. ```shell revive $PATH ``` -------------------------------- ### Format and lint SQL code with Sqlfluff Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Sqlfluff is a flexible SQL linter and auto-formatter. These commands demonstrate fixing, formatting, and linting SQL files with specified dialects and options. ```shell sqlfluff fix --disable-progress-bar --nocolor --dialect ansi $PATH ``` ```shell sqlfluff format --disable-progress-bar --nocolor --dialect ansi $PATH ``` ```shell sqlfluff lint --disable-progress-bar --nocolor --dialect ansi $PATH ``` -------------------------------- ### Create New CacheEntry in Rust Source: https://docs.rs/mdsf/latest/mdsf/caching/struct A constructor function for the CacheEntry struct. It takes a configuration hash, a file path, and the file content as input and returns a new instance of CacheEntry. This is the primary way to initialize a cache entry. ```rust pub fn new(config_hash: String, file_path: &Path, file_content: &str) -> Self ``` -------------------------------- ### Format HCL Files with Terragrunt Hclfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Terragrunt Hclfmt recursively finds HCL files and rewrites them into a canonical format. Use this command to format HCL files. Ensure Terragrunt is installed. ```shell terragrunt hclfmt --terragrunt-hclfmt-file $PATH ``` -------------------------------- ### Format QML Files with qmlfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum qmlfmt is a command-line application designed to format QML files. It takes file paths as input and modifies them in place. This tool is useful for maintaining consistent QML code style. ```shell qmlfmt -w $PATH ``` -------------------------------- ### Format GitHub Actions Workflows with Actionlint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Actionlint is a static checker for GitHub Actions workflow files. It helps identify potential issues and enforce formatting rules. The command applies formatting to the specified path. ```bash actionlint $PATH ``` -------------------------------- ### Format HTML Documents with XqHtml Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Xq, when used with the `--html` flag, can format HTML documents. This is useful for ensuring consistent indentation and readability of HTML code. The command processes HTML input. ```shell xq --html ``` -------------------------------- ### Format Dart code with DartFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum DartFormat is the official formatter for Dart code, ensuring consistent and readable code according to the Dart style guide. It is an essential tool for maintaining the quality of Dart projects. The command targets the specified path. ```bash dart format $PATH ``` -------------------------------- ### Static code checking for C++ with Cpplint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Cpplint is a static code checker specifically for C++ code. It helps enforce coding style and identify potential issues based on Google's C++ style guide. The `--quiet` flag reduces the amount of output. ```bash cpplint --quiet $PATH ``` -------------------------------- ### Format Dockerfiles with Dockfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Dockfmt provides Dockerfile formatting and parsing, similar to `gofmt` for Go. It can format files in-place. ```bash dockfmt fmt -w $PATH ``` -------------------------------- ### Format Pascal Source with ptop Source: https://docs.rs/mdsf/latest/mdsf/tools/enum ptop is a free Pascal source formatter. It takes file paths as input to format Free Pascal code. ```shell ptop $PATH $PATH ``` -------------------------------- ### Format Go code with Crlfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Crlfmt is a formatter for Go code, implementing CockroachDB's additions to the standard Go style guide. It ensures consistent formatting for Go projects within the CockroachDB ecosystem. The `-w` flag writes the formatted code back to the file. ```bash crlfmt -w $PATH ``` -------------------------------- ### Format XML Documents with Xq Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Xq is a command-line tool capable of formatting XML documents. It aids in making XML more readable and maintaining a consistent structure. Basic usage involves invoking the command with an XML file. ```shell xq ``` -------------------------------- ### Format Caddyfiles with CaddyFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CaddyFmt is a command-line tool for formatting or prettifying Caddyfiles. It helps in maintaining a clean and consistent configuration for the Caddy web server. The `-w` flag enables in-place writing. ```bash caddy fmt $PATH -w ``` -------------------------------- ### Define LineInfo Struct in Rust Source: https://docs.rs/mdsf/latest/mdsf/struct This Rust code defines the `LineInfo` struct, which encapsulates details about a specific line within a file. It includes the filename, programming language, and the start and end character positions of the line. The struct uses a lifetime parameter 'a for its string slices and path references. ```rust pub struct LineInfo<'a> { pub filename: &'a Path, pub language: &'a str, pub start: usize, pub end: usize, } ``` -------------------------------- ### Check and Format Code with Biome Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Biome is a toolchain for web projects that includes a formatter, linter, and more. `biome check` runs both formatting and linting, with `--write` applying fixes. `--unsafe` enables potentially risky but powerful fixes. ```bash biome check --write $PATH ``` ```bash biome check --write --unsafe $PATH ``` -------------------------------- ### Check Types with Ty Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Ty is an extremely fast Python type checker written in Rust. This command checks for type errors in Python files. Ensure Ty is installed. ```shell ty check $PATH ``` -------------------------------- ### Prettify Cabal package configuration with CabalPrettify Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CabalPrettify is a utility for making Cabal package configuration files more readable. It applies a consistent style to these files. The command takes the file path as an argument. ```bash cabal-prettify $PATH ``` -------------------------------- ### Fix Prose Errors with TextlintFix Source: https://docs.rs/mdsf/latest/mdsf/tools/enum TextlintFix attempts to fix prose errors detected by Textlint. This command applies automatic fixes to the specified files. Ensure Textlint is installed. ```shell textlint --fix $PATH ``` -------------------------------- ### Check SaltStack code with SaltLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum SaltLint is a command-line utility that checks for best practices in SaltStack configuration files. ```shell salt-lint $PATH ``` -------------------------------- ### MdsfFormatter::format Method (Rust) Source: https://docs.rs/mdsf/latest/mdsf/execution/enum The format method on MdsfFormatter takes a snippet path, line information, timeout, debug flag, configuration runners, and a handler for missing tool binaries. It returns a Result containing an Option for the formatted output or an MdsfError. ```rust pub fn format( &self, snippet_path: &Path, info: &LineInfo<'_>, timeout: u64, debug_enabled: bool, config_runners: &MdsfConfigRunners, on_missing_tool_binary: OnMissingToolBinary, ) -> Result, MdsfError> ``` -------------------------------- ### Format .cabal files with CabalFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CabalFmt is an experimental tool for formatting .cabal files. It aims to standardize the structure and appearance of Haskell package description files. The `--inplace` flag modifies the file directly. ```bash cabal-fmt --inplace $PATH ``` -------------------------------- ### Format Go code with gofmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum gofmt is the standard Go formatter, responsible for formatting Go programs according to idiomatic Go style. ```bash gofmt -w $PATH ``` -------------------------------- ### Format Groovy/Jenkinsfile/Gradle with NpmGroovyLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Lints, formats, and auto-fixes Groovy, Jenkinsfile, and Gradle files. The --format flag applies formatting. ```shell npm-groovy-lint --format $PATH ``` -------------------------------- ### Remove Unused Imports with Unimport Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Unimport is a linter and formatter for removing unused import statements in Python code. The -r flag recursively checks directories. Ensure unimport is installed. ```shell unimport -r $PATH ``` -------------------------------- ### Lint and Fix Twig Code with twig-cs-fixer Source: https://docs.rs/mdsf/latest/mdsf/tools/enum twig-cs-fixer is a tool to automatically fix Twig Coding Standards issues. This command lints and fixes Twig files. Ensure twig-cs-fixer is installed. ```shell twig-cs-fixer lint $PATH --fix --no-interaction --quiet ``` -------------------------------- ### Format Bicep Files with BicepFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Bicep is a declarative language for defining Azure resources. The `bicep format` command formats Bicep files according to standard conventions, improving readability. ```bash bicep format $PATH ``` -------------------------------- ### Format TypeSpec Files with tsp format Source: https://docs.rs/mdsf/latest/mdsf/tools/enum tsp format is used to format TypeSpec files. This command applies formatting rules to the specified files. Ensure the TypeSpec CLI is installed. ```shell tsp format $PATH ``` -------------------------------- ### Format .http and .rest files with kulala-fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum kulala-fmt's 'format' command reformats .http and .rest code files. It takes the file path as an argument to apply the formatting. ```shell kulala-fmt format $PATH ``` -------------------------------- ### Autofix Python Exceptions with Tryceratops Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Tryceratops is a linter to prevent exception handling antipatterns in Python. The --autofix flag attempts to automatically fix issues. Ensure tryceratops is installed. ```shell tryceratops --autofix $PATH ``` -------------------------------- ### Format Makefiles with MbakeFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Mbake is a tool that functions as both a Makefile formatter and linter. The 'format' command applies formatting rules to the specified file. ```shell mbake format $PATH ``` -------------------------------- ### Implement TryInto Trait Source: https://docs.rs/mdsf/latest/mdsf/caching/struct Provides an implementation for the `TryInto` trait, enabling fallible conversions from one type to another. It leverages the `TryFrom` implementation of the target type. ```rust type Error = >::Error> fn try_into(self) -> Result>::Error> ``` -------------------------------- ### Sort Python Imports with Usort Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Usort is a safe, minimal import sorting tool for Python projects. This command formats and sorts import statements in Python files. Ensure usort is installed. ```shell usort format $PATH ``` -------------------------------- ### Format SQL code with Sleek Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Sleek is a CLI tool for formatting SQL code, helping to maintain a consistent style and improve readability. ```shell sleek $PATH ``` -------------------------------- ### Format KDL documents with kdlfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum kdlfmt is a formatter for KDL documents. The 'format' command is used, followed by the path to the KDL file. ```shell kdlfmt format $PATH ``` -------------------------------- ### Format Protobuf Files with BufFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum BufFormat is a tool for formatting Protocol Buffer (Protobuf) files according to specified style guidelines. It ensures consistency in Protobuf definitions. The `--write` flag applies the formatting. ```bash buf format --write $PATH ``` -------------------------------- ### Lint Makefiles with Checkmake Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Checkmake is an experimental tool for linting and analyzing Makefiles. It helps identify potential issues and enforce coding standards in your Makefile projects. The command takes the path to the Makefile as an argument. ```bash checkmake $PATH ``` -------------------------------- ### Format Dockerfiles with Dockerfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Dockerfmt is a formatter for Dockerfiles, ensuring a modern and consistent syntax. It supports writing formatted output back to files. ```bash dockerfmt -w -n $PATH ``` -------------------------------- ### Lint Solidity code with Solhint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Solhint is an open-source project providing a linting utility for Solidity code. It can fix issues and run in quiet mode without prompts. ```shell solhint --quiet --fix --noPrompt $PATH ``` -------------------------------- ### Format Go source code with golangci-lint fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum golangci-lint fmt is a formatter for Go source code, often used as part of a broader linting workflow. ```bash golangci-lint fmt $PATH ``` -------------------------------- ### Format Nginx Config with Nginxfmt (Python) Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Formats Nginx configuration files using a Python-based tool. It operates on the provided file path and has no external dependencies. ```shell nginxfmt $PATH ``` -------------------------------- ### Spell Check Code with Typos Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Typos is a source code spell checker. The -w flag writes the changes in place, and --no-ignore and --hidden ensure all files are checked. Ensure typos is installed. ```shell typos -w --no-ignore --hidden $PATH ``` -------------------------------- ### Format with MesonFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Formats meson build files. It takes a file path as input and modifies the file in place. ```shell meson fmt -i $PATH ``` -------------------------------- ### Format dbt SQL files with Sqlfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Sqlfmt formats dbt SQL files to ensure a consistent style. ```shell sqlfmt $PATH ``` -------------------------------- ### Check documentation files with SphinxLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum SphinxLint checks for stylistic and formal issues in .rst and .py files included in documentation, ensuring consistency. ```shell sphinx-lint $PATH ``` -------------------------------- ### Format Haskell package descriptions with CabalGild Source: https://docs.rs/mdsf/latest/mdsf/tools/enum CabalGild is a tool designed to format Haskell package descriptions. It takes input from a specified path and writes the formatted output to another path. This allows for controlled formatting operations. ```bash cabal-gild --input $PATH --output $PATH ``` -------------------------------- ### Format Android Blueprint Files with Bpfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Bpfmt is a formatter for Android's Blueprint build system files. It helps maintain a consistent style for these configuration files. The `-w` flag writes the formatted output back to the file. ```bash bpfmt -w $PATH ``` -------------------------------- ### Apply Runtime Style Source: https://docs.rs/mdsf/latest/mdsf/cli/struct Applies a style determined at runtime to the current object. ```APIDOC ## fn style(&self, style: Style) ### Description Apply a runtime-determined style to the current object. ### Method Method not specified (likely a builder pattern method) ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust // Example usage (assuming `self` is a type that supports this method and `Style` is defined) // let styled_text = self.style(Style::BOLD); ``` ### Response #### Success Response Returns a `Styled` struct containing a reference to the current object and the applied style. #### Response Example ```json { "example": "Styled<&Self>" } ``` ``` -------------------------------- ### Format Bazel BUILD files with Buildifier Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Buildifier is a tool for formatting and linting Bazel BUILD files. It helps maintain a consistent style across your Bazel projects. Usage involves providing the path to the BUILD file. ```bash buildifier $PATH ``` -------------------------------- ### Check formatting of .http and .rest files with kulala-fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum kulala-fmt's 'check' command verifies if .http and .rest code files are formatted according to defined standards. It operates on the provided file path. ```shell kulala-fmt check $PATH ``` -------------------------------- ### Format jq queries with jqfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum jqfmt is a formatter for jq queries, similar to gofmt for Go code, ensuring consistent formatting of jq scripts. ```bash jqfmt ``` -------------------------------- ### Format Atlas HCL Files with AtlasFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum AtlasFmt is a tool for formatting Atlas HCL (HashiCorp Configuration Language) files. It ensures consistent syntax and structure for your Atlas configurations. ```bash atlas schema fmt $PATH ``` -------------------------------- ### Run Go linters with golangci-lint run Source: https://docs.rs/mdsf/latest/mdsf/tools/enum golangci-lint run is a fast linter runner for Go, used to identify a wide range of code quality issues. ```bash golangci-lint run $PATH ``` -------------------------------- ### Analyze Slim templates with SlimLint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum SlimLint is a tool for analyzing Slim template files, checking for stylistic and formal issues. ```shell slim-lint $PATH ``` -------------------------------- ### MdsfConfigRunners Default Implementation Source: https://docs.rs/mdsf/latest/mdsf/config/struct Provides the default implementation for the MdsfConfigRunners struct, allowing it to be created with its default values. This is useful for scenarios where explicit configuration is not required. ```rust impl Default for MdsfConfigRunners { fn default() -> MdsfConfigRunners { MdsfConfigRunners { bunx: false, deno: false, dotnet: false, dub: false, gem_exec: false, npx: false, pipx: false, pnpm: false, uv: false, yarn: false, } } } ``` -------------------------------- ### Format Go Assembler Code with Asmfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Asmfmt is a Go Assembler Formatter that standardizes the layout of assembly code. The `-w` flag writes the formatted code back to the file. ```bash asmfmt -w $PATH ``` -------------------------------- ### Reformat Zig Source Code with ZigFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum ZigFmt is the official tool for reformatting Zig source code into its canonical form. It ensures that all Zig code adheres to the language's standard style. The command takes the path to Zig files as input. ```shell zig fmt $PATH ``` -------------------------------- ### Format stylesheets with Stylefmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Stylefmt is a tool that automatically formats stylesheets, helping to maintain consistent code style. ```shell stylefmt $PATH ``` -------------------------------- ### Lint QML Files with qmllint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum qmllint is a tool provided with Qt that verifies the syntactic validity of QML files. It checks for syntax errors and potential issues in QML code, taking file paths as arguments. ```shell qmllint $PATH ``` -------------------------------- ### Format Janet code with JanetFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum JanetFormat is a formatter for Janet code, ensuring consistent style and readability. ```bash janet-format ``` -------------------------------- ### CacheEntry Trait Implementations Source: https://docs.rs/mdsf/latest/mdsf/caching/struct Information about the traits implemented for the CacheEntry struct. ```APIDOC ## CacheEntry Trait Implementations ### Auto Trait Implementations - **`Freeze`**: Indicates that the type is safe to freeze (i.e., cannot be mutated after creation). - **`RefUnwindSafe`**: Indicates that references to the type are safe to unwind across. - **`Send`**: Indicates that the type can be safely sent between threads. - **`Sync`**: Indicates that the type can be safely shared between threads. - **`Unpin`**: Indicates that the type does not require any special handling when pinned. - **`UnwindSafe`**: Indicates that the type is safe to unwind across. ### Blanket Implementations These are implementations of traits for generic types where `CacheEntry` might satisfy the trait bounds. - **`Any`**: Allows for dynamic type identification. - `type_id(&self) -> TypeId`: Gets the `TypeId` of `self`. - **`Borrow`**: Allows borrowing the type as a reference `&T`. - `borrow(&self) -> &T`: Immutably borrows from an owned value. - **`BorrowMut`**: Allows mutable borrowing of the type as `&mut T`. - `borrow_mut(&mut self) -> &mut T`: Mutably borrows from an owned value. - **`From`**: Allows conversion from a type `T` to itself. - `from(t: T) -> T`: Returns the argument unchanged. - **`Into`**: Allows conversion into another type `U` where `U` implements `From`. - `into(self) -> U`: Calls `U::from(self)`. - **`OwoColorize`**: Provides methods for coloring terminal output. - Methods include `fg`, `bg`, and specific color methods like `red`, `on_blue`, `bright_green`, etc. ``` -------------------------------- ### Lint Laravel Configuration with Duster Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Duster provides linting capabilities for Laravel applications to enforce code standards. This command runs the linter. ```bash duster lint --quiet --no-interaction $PATH ``` -------------------------------- ### Background Dynamic RGB Color Source: https://docs.rs/mdsf/latest/mdsf/cli/struct Sets the background color to an RGB value provided at runtime. ```APIDOC ## fn on_truecolor(&self, r: u8, g: u8, b: u8) ### Description Sets the background color to an RGB value. The RGB components (r, g, b) are provided as runtime arguments. ### Method Method not specified (likely a builder pattern method) ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust // Example usage (assuming `self` is a type that supports this method) // let color = self.on_truecolor(0, 255, 0); // Sets background to green ``` ### Response #### Success Response Returns a `BgDynColorDisplay` struct configured with the specified runtime RGB color. #### Response Example ```json { "example": "BgDynColorDisplay<'_, Rgb, Self>" } ``` ``` -------------------------------- ### Format Markdown files like gofmt with markdownfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum markdownfmt is a tool that formats Markdown files in a manner similar to gofmt. The '-w' flag writes the formatted content back to the file. ```shell markdownfmt -w $PATH ``` -------------------------------- ### Lint and Fix Protocol Buffers with protolint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Protolint is a pluggable linter and fixer for Protocol Buffers, enforcing style and conventions. It can lint files and also apply fixes. ```shell protolint lint -fix $PATH ``` -------------------------------- ### Format Nomad Config with NomadFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Formats HashiCorp Nomad configuration files. It operates on the provided file path. ```shell nomad fmt $PATH ``` -------------------------------- ### Format with MiseFmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Formats mise.toml configuration files. It can read from stdin or a file path. ```shell mise fmt --stdin ``` -------------------------------- ### Format D2 diagrams with D2Fmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum D2Fmt is a command-line tool for formatting D2 diagram code. It ensures that your D2 definitions are consistently styled for better readability. The command takes the path to the D2 file(s) as an argument. ```bash d2 fmt $PATH ``` -------------------------------- ### Lint and Format XML Documents with Xmllint Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Xmllint is a powerful XML linter that can also be used for formatting XML documents. It helps validate XML against schemas and ensures proper structure. The `--format` option pretty-prints the XML, and `--output` specifies the output file. ```shell xmllint --format $PATH --output $PATH ``` -------------------------------- ### Format KDL documents (v1) with kdlfmt Source: https://docs.rs/mdsf/latest/mdsf/tools/enum kdlfmt can format KDL documents specifically for version 1. The command includes the --kdl-version v1 flag. ```shell kdlfmt format --kdl-version v1 $PATH ``` -------------------------------- ### VerifyCommandArguments Struct Definition Source: https://docs.rs/mdsf/latest/mdsf/cli/struct Defines the structure for command-line arguments related to the 'verify' command. It includes fields for input paths, stdin usage, configuration file path, debugging options, thread count, timeouts, and specific behaviors for missing language definitions or tool binaries. This struct is essential for parsing and holding the arguments provided by the user. ```rust pub struct VerifyCommandArguments { pub input: Vec, pub stdin: bool, pub config: Option, pub debug: bool, pub threads: Option, pub timeout: Option, pub on_missing_language_definition: Option, pub on_missing_tool_binary: Option, } ``` -------------------------------- ### Pretty print JSON with jsonpp Source: https://docs.rs/mdsf/latest/mdsf/tools/enum jsonpp is a fast command-line JSON pretty printer. The '-s' flag is used to initiate the pretty printing process. ```shell jsonpp -s ``` -------------------------------- ### Format Go code with gofumpt (stricter gofmt) Source: https://docs.rs/mdsf/latest/mdsf/tools/enum gofumpt is a stricter alternative to gofmt, enforcing a more opinionated format for Go code. ```bash gofumpt -w $PATH ``` -------------------------------- ### Lint D Source Code with Dscanner Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Dscanner provides linting for D source code to identify potential issues. This command runs the linter on the specified path. ```bash dscanner lint $PATH ``` -------------------------------- ### Format Prisma Schema with prisma format Source: https://docs.rs/mdsf/latest/mdsf/tools/enum prisma format is a command for interacting with the Prisma ORM to format the Prisma schema file. It requires the path to the schema file. ```shell prisma format --schema={$PATH_STRING} ``` -------------------------------- ### Format Mojo Code with MojoFormat Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Formats Mojo source files. The -q flag likely indicates a quiet mode. ```shell mojo format -q $PATH ``` -------------------------------- ### Lint Markdown files with markdownlint-cli2 Source: https://docs.rs/mdsf/latest/mdsf/tools/enum markdownlint-cli2 provides a fast, configuration-based command-line interface for linting Markdown/CommonMark files using the markdownlint library. The '--fix' flag enables automatic correction. ```shell markdownlint-cli2 --fix $PATH ``` -------------------------------- ### Lint Postgres migrations and SQL with Squawk Source: https://docs.rs/mdsf/latest/mdsf/tools/enum Squawk is a linter specifically designed for Postgres migrations and general SQL code. ```shell squawk $PATH ```