[PR #1505] [CLOSED] Add Azure Pipelines for CI using awesome-lint #38840

Closed
opened 2026-06-04 07:45:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sindresorhus/awesome/pull/1505
Author: @damccorm
Created: 1/18/2019
Status: Closed

Base: masterHead: master


📝 Commits (6)

  • 908a079 Add azure pipelines
  • a797fb4 Turn on test reporting for example
  • 4251847 Get rid of stuff for examples, get ready to merge
  • 68e2d4d Comments
  • 75773f7 React to awesome-lint changes
  • 904678f Merge pull request #2 from damccorm/users/damccorm/update-awesome-lint

📊 Changes

6 files changed (+4275 additions, -0 deletions)

View changed files

.azure-pipelines/.gitignore (+2 -0)
.azure-pipelines/config.js (+63 -0)
.azure-pipelines/package-lock.json (+4076 -0)
.azure-pipelines/package.json (+11 -0)
.azure-pipelines/validate-requirements.js (+96 -0)
azure-pipelines.yml (+27 -0)

📄 Description

Description

This PR adds Azure Pipelines to perform CI builds and PR builds using awesome-lint. I know you've had discussions about CI in this repo before in #1365, and you ultimately ran into this blocker. My solution provides all of the advantages discussed and addresses this problem by using a custom config file that ignores the bad rule that was a blocker. For CI builds, it just validates that this repo conforms to awesome-lint, for PR builds it checks if this repo conforms and additionally checks if all added linked GitHub repos in the diff conform.

Full disclosure: I work at Microsoft as a software engineer on Pipelines, but I also genuinely think this could be a really helpful improvement. A couple of things I'd like to highlight:

My pipeline

You can see that this works for me in my pipeline here.

image

PR validation

I added a PR that links to a list that should fail the linting here. You an see that it failed the status check and links to the full build.

image

Test reporting

One of the big advantages of Azure Pipelines is that it provides really nice test reporting. Unfortunately, to do this you need to have a formatted test file to draw from which requires a custom reporter. Awesome-lint doesn't currently support this, but I've added a PR to add that capability. Once that's (hopefully) merged in, we can just consume the newest version of awesome-lint and flip on the publishTests flag and we'll get test reporting just like this.

EDIT: That PR has been merged so we now have fully functional test reporting.

image

Config file

Right now I'm using a config file for awesome-lint that is basically an exact replica of the one they have by default. The only difference is I commented out the 1 breaking rule. I'm also happy to add or subtract additional rules as appropriate, or this can be fine tuned over time if a rule proves to be a red herring often. In addition, if awesome-lint ever reaches the point where we just want to use that, we can just delete the config file/reference to it in validate-requirements.js and it should just work.

By submitting this pull request I confirm I've read and complied with the below requirements 🖖

Requirements for your pull request

  • You have to review at least 2 other open pull requests. Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration.

Reviewed #1508, #1499, #1486, and #1452

  • Rest of the requirements don't apply since this isn't an awesome list

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sindresorhus/awesome/pull/1505 **Author:** [@damccorm](https://github.com/damccorm) **Created:** 1/18/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`908a079`](https://github.com/sindresorhus/awesome/commit/908a07919556f93aeb9db0a764ac855939edfcb6) Add azure pipelines - [`a797fb4`](https://github.com/sindresorhus/awesome/commit/a797fb4865a35a4f6ed244c5baf9e5f47921e639) Turn on test reporting for example - [`4251847`](https://github.com/sindresorhus/awesome/commit/4251847ff3aaddbc88fef59e70097652a7883243) Get rid of stuff for examples, get ready to merge - [`68e2d4d`](https://github.com/sindresorhus/awesome/commit/68e2d4dba34172b37deea4d3bb4a0c5851549f3a) Comments - [`75773f7`](https://github.com/sindresorhus/awesome/commit/75773f70eee142a16384823a33125d04f69ea4b4) React to awesome-lint changes - [`904678f`](https://github.com/sindresorhus/awesome/commit/904678f0f9ab0db2be9536a1f7366195be5d1190) Merge pull request #2 from damccorm/users/damccorm/update-awesome-lint ### 📊 Changes **6 files changed** (+4275 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.azure-pipelines/.gitignore` (+2 -0) ➕ `.azure-pipelines/config.js` (+63 -0) ➕ `.azure-pipelines/package-lock.json` (+4076 -0) ➕ `.azure-pipelines/package.json` (+11 -0) ➕ `.azure-pipelines/validate-requirements.js` (+96 -0) ➕ `azure-pipelines.yml` (+27 -0) </details> ### 📄 Description ## Description This PR adds Azure Pipelines to perform CI builds and PR builds using awesome-lint. I know you've had discussions about CI in this repo before in #1365, and you ultimately ran into [this blocker](https://github.com/sindresorhus/awesome/pull/1394#issuecomment-430312051). My solution provides all of the advantages discussed and addresses this problem by using a custom config file that ignores the bad rule that was a blocker. For CI builds, it just validates that this repo conforms to awesome-lint, for PR builds it checks if this repo conforms and additionally checks if all added linked GitHub repos in the diff conform. Full disclosure: I work at Microsoft as a software engineer on Pipelines, but I also genuinely think this could be a really helpful improvement. A couple of things I'd like to highlight: ### My pipeline You can see that this works for me in my pipeline [here](https://dev.azure.com/awesome-damccorm-fork/awesome/_build?definitionId=8). ![image](https://user-images.githubusercontent.com/42773683/51398060-98e3bf80-1b10-11e9-98a2-7bb47adde585.png) ### PR validation I added a PR that links to a list that should fail the linting [here](https://github.com/damccorm/awesome/pull/1). You an see that it failed the status check and links to the full build. ![image](https://user-images.githubusercontent.com/42773683/51398078-a1d49100-1b10-11e9-95ff-4eb1b91a2f8d.png) ### Test reporting One of the big advantages of Azure Pipelines is that it provides really nice test reporting. Unfortunately, to do this you need to have a formatted test file to draw from which requires a custom reporter. Awesome-lint doesn't currently support this, but I've [added a PR](https://github.com/sindresorhus/awesome-lint/pull/55) to add that capability. Once that's (hopefully) merged in, we can just consume the newest version of awesome-lint and flip on the ```publishTests``` flag and we'll get test reporting just like [this](https://dev.azure.com/awesome-damccorm-fork/awesome/_build/results?buildId=49&view=ms.vss-test-web.test-result-details). EDIT: That PR has been merged so we now have fully functional test reporting. ![image](https://user-images.githubusercontent.com/42773683/51398092-a9943580-1b10-11e9-92c5-2f1fa7f8a75b.png) ### Config file Right now I'm using a config file for awesome-lint that is basically an exact replica of the one they have by default. The only difference is I commented out the 1 breaking rule. I'm also happy to add or subtract additional rules as appropriate, or this can be fine tuned over time if a rule proves to be a red herring often. In addition, if awesome-lint ever reaches the point where we just want to use that, we can just delete the config file/reference to it in ```validate-requirements.js``` and it should just work. ### By submitting this pull request I confirm I've read and complied with the below requirements 🖖 ## Requirements for your pull request - **You have to review at least 2 other [open pull requests](https://github.com/sindresorhus/awesome/pulls?q=is%3Apr+is%3Aopen).** Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration. Reviewed #1508, #1499, #1486, and #1452 - **Rest of the requirements don't apply since this isn't an awesome list** --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-04 07:45:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-sindresorhus#38840