diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000000..4610e6c228 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,5 @@ +default: true +MD013: false # line length +MD024: # no-duplicate-heading Multiple headings with the same content + siblings_only: true +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 e23df07b72..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" -i "eng/readme-templates/*" -i "eng/common/*" diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index 2b5d8b3039..0000000000 --- a/.markdownlint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "default": true, - "MD013": false, // line length - "MD024": { // no-duplicate-heading Multiple headings with the same content - "siblings_only": true - }, - "MD033": false, // no inline HTML -} diff --git a/samples/aspnetapp/README.md b/samples/aspnetapp/README.md index bec7acb736..2b3ea8b8f7 100644 --- a/samples/aspnetapp/README.md +++ b/samples/aspnetapp/README.md @@ -81,7 +81,7 @@ You may notice that the sample includes a [health check](https://learn.microsoft ## Build image with the SDK -The easiest way to [build images is with the SDK](https://github.com/dotnet/sdk-container-builds). +The easiest way to [build images is with the SDK](https://github.com/dotnet/sdk-container-builds). ```console dotnet publish /p:PublishProfile=DefaultContainer diff --git a/samples/releasesapi/README.md b/samples/releasesapi/README.md index 0ab6896a52..c6ec161ea7 100644 --- a/samples/releasesapi/README.md +++ b/samples/releasesapi/README.md @@ -1,6 +1,6 @@ # Release Json Report API -This app demonstrates publishing an app as [native AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/) in containers. +This app demonstrates publishing an app as [native AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/) in containers. > [!NOTE] > The base images used by this sample are in preview. @@ -23,7 +23,7 @@ It exposes two endpoints: ## App -The app is intended as a sort of compliance report for .NET. The report includes supported major releases and those recently out of support. It includes the latest and latest security patch versions for each of those major releases. +The app is intended as a sort of compliance report for .NET. The report includes supported major releases and those recently out of support. It includes the latest and latest security patch versions for each of those major releases. This same information is available from the [release JSON](https://github.com/dotnet/core/blob/main/release-notes/releases-index.json) files that the team maintains, but that requires a bit of code to provide the same report.