diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000000..767b122e56 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,5 @@ +default: true +MD013: # line length + code_block_line_length: 256 + heading_line_length: 96 +MD033: false # no inline HTML diff --git a/.github/workflows/lint-code-base.yml b/.github/workflows/lint-code-base.yml new file mode 100644 index 0000000000..779a667ec2 --- /dev/null +++ b/.github/workflows/lint-code-base.yml @@ -0,0 +1,31 @@ +name: Lint Code Base + +on: + pull_request: null + +permissions: {} + +jobs: + run-lint: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter@v6 # https://github.com/github/super-linter + env: + DEFAULT_BRANCH: main + FILTER_REGEX_EXCLUDE: eng/common/.*|eng/readme-templates/.* + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_ALL_CODEBASE: false + VALIDATE_MARKDOWN: true diff --git a/.github/workflows/markdownlint-problem-matcher.json b/.github/workflows/markdownlint-problem-matcher.json deleted file mode 100644 index f0741f6b90..0000000000 --- a/.github/workflows/markdownlint-problem-matcher.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "markdownlint", - "pattern": [ - { - "regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$", - "file": 1, - "line": 2, - "column": 3, - "code": 4, - "message": 5 - } - ] - } - ] -} diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml deleted file mode 100644 index 5fbfec943e..0000000000 --- a/.github/workflows/markdownlint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: markdownlint - -permissions: - contents: read - -on: - pull_request: - paths: - - "**/*.md" - - ".markdownlint.json" - - ".github/workflows/markdownlint.yml" - - ".github/workflows/markdownlint-problem-matcher.json" - -jobs: - lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Run Markdownlint - run: | - echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" - npm i -g markdownlint-cli - markdownlint "**/*.md" diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index cd8da2c680..0000000000 --- a/.markdownlint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "default": true, - // line length - "MD013": { - "code_block_line_length": 256, - "heading_line_length": 96 - }, - "MD033": false, // no inline HTML -}