Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdownlint-cli2-formatter-sarif

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint-cli2-formatter-sarif

An output formatter for markdownlint-cli2 that writes results to a file in Static Analysis Results Interchange Format/SARIF

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.3K
increased by1.69%
Maintainers
0
Weekly downloads
 
Created
Source

markdownlint-cli2-formatter-sarif

An output formatter for markdownlint-cli2 that writes results to a file in Static Analysis Results Interchange Format/SARIF

npm version License

Install

npm install markdownlint-cli2-formatter-sarif --save-dev

Use

For the default output file name of "markdownlint-cli2-sarif.sarif", use the following .markdownlint-cli2.jsonc:

{
  "outputFormatters": [
    [ "markdownlint-cli2-formatter-sarif" ]
  ]
}

To customize the output file name, use the following .markdownlint-cli2.jsonc:

{
  "outputFormatters": [
    [ "markdownlint-cli2-formatter-sarif", { "name": "custom-name.sarif" } ]
  ]
}

Example

{
  "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "markdownlint-cli2-formatter-sarif",
          "version": "0.0.1",
          "informationUri": "https://github.com/DavidAnson/markdownlint-cli2",
          "rules": [
            {
              "id": "MD009",
              "name": "Md009NoTrailingSpaces",
              "shortDescription": {
                "text": "Trailing spaces"
              },
              "fullDescription": {
                "text": "Trailing spaces"
              },
              "helpUri": "https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md009.md"
            },
            {
              "id": "MD012",
              "name": "Md012NoMultipleBlanks",
              "shortDescription": {
                "text": "Multiple consecutive blank lines"
              },
              "fullDescription": {
                "text": "Multiple consecutive blank lines"
              },
              "helpUri": "https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md012.md"
            },
            {
              "id": "MD025",
              "name": "Md025SingleTitleSingleH1",
              "shortDescription": {
                "text": "Multiple top-level headings in the same document"
              },
              "fullDescription": {
                "text": "Multiple top-level headings in the same document"
              },
              "helpUri": "https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md025.md"
            },
            {
              "id": "MD019",
              "name": "Md019NoMultipleSpaceAtx",
              "shortDescription": {
                "text": "Multiple spaces after hash on atx style heading"
              },
              "fullDescription": {
                "text": "Multiple spaces after hash on atx style heading"
              },
              "helpUri": "https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md019.md"
            },
            {
              "id": "MD047",
              "name": "Md047SingleTrailingNewline",
              "shortDescription": {
                "text": "Files should end with a single newline character"
              },
              "fullDescription": {
                "text": "Files should end with a single newline character"
              },
              "helpUri": "https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md047.md"
            }
          ]
        }
      },
      "results": [
        {
          "ruleId": "MD009",
          "message": {
            "text": "Trailing spaces, Expected: 0 or 2; Actual: 1"
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "viewme.md"
                },
                "region": {
                  "startLine": 3,
                  "endLine": 3,
                  "startColumn": 10,
                  "endColumn": 11
                }
              }
            }
          ]
        },
        {
          "ruleId": "MD012",
          "message": {
            "text": "Multiple consecutive blank lines, Expected: 1; Actual: 2"
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "viewme.md"
                },
                "region": {
                  "startLine": 5,
                  "endLine": 5
                }
              }
            }
          ]
        },
        {
          "ruleId": "MD025",
          "message": {
            "text": "Multiple top-level headings in the same document, Context: \"# Description\""
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "viewme.md"
                },
                "region": {
                  "startLine": 6,
                  "endLine": 6
                }
              }
            }
          ]
        },
        {
          "ruleId": "MD019",
          "message": {
            "text": "Multiple spaces after hash on atx style heading, Context: \"##  Summary\""
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "viewme.md"
                },
                "region": {
                  "startLine": 12,
                  "endLine": 12,
                  "startColumn": 1,
                  "endColumn": 6
                }
              }
            }
          ]
        },
        {
          "ruleId": "MD047",
          "message": {
            "text": "Files should end with a single newline character"
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "viewme.md"
                },
                "region": {
                  "startLine": 14,
                  "endLine": 14,
                  "startColumn": 14,
                  "endColumn": 15
                }
              }
            }
          ]
        }
      ]
    }
  ]
}

Keywords

FAQs

Package last updated on 06 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc