mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 20:39:05 +00:00
refactor: ban std.debug.assert (#10168)
* Ban `std.debug.assert` * Create .clangd * Update lint.yml * Update linter.ts * update * lint * Update linter.ts * Update linter.ts * update * Update linter.ts * update * Update linter.ts * more * Update install.zig * words * Remove UB
This commit is contained in:
2
.github/workflows/bun-linux-build.yml
vendored
2
.github/workflows/bun-linux-build.yml
vendored
@@ -310,7 +310,7 @@ jobs:
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved.
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved. Thank you.
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- id: fail
|
||||
|
||||
2
.github/workflows/bun-mac-aarch64.yml
vendored
2
.github/workflows/bun-mac-aarch64.yml
vendored
@@ -472,7 +472,7 @@ jobs:
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved.
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved. Thank you.
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- id: fail
|
||||
|
||||
2
.github/workflows/bun-mac-x64-baseline.yml
vendored
2
.github/workflows/bun-mac-x64-baseline.yml
vendored
@@ -463,7 +463,7 @@ jobs:
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved.
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved. Thank you.
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- id: fail
|
||||
|
||||
2
.github/workflows/bun-mac-x64.yml
vendored
2
.github/workflows/bun-mac-x64.yml
vendored
@@ -458,7 +458,7 @@ jobs:
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved.
|
||||
✅ test failures on ${{ matrix.tag }} have been resolved. Thank you.
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- id: fail
|
||||
|
||||
2
.github/workflows/bun-windows.yml
vendored
2
.github/workflows/bun-windows.yml
vendored
@@ -501,7 +501,7 @@ jobs:
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅🪟 Test regressions on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} have been resolved.
|
||||
✅🪟 Test regressions on Windows ${{ matrix.arch }}${{ matrix.cpu == 'nehalem' && ' Baseline' || '' }} have been resolved. Thank you.
|
||||
- id: fail
|
||||
name: Fail the build
|
||||
if: steps.test.outputs.failing_tests != ''
|
||||
|
||||
86
.github/workflows/lint.yml
vendored
Normal file
86
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: lint
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- jarred/assert
|
||||
paths:
|
||||
- ".github/workflows/lint.yml"
|
||||
- "src/**/*.zig"
|
||||
- "src/*.zig"
|
||||
|
||||
jobs:
|
||||
format:
|
||||
name: lint
|
||||
runs-on: ${{ vars.RUNNER_LINUX_X64 || 'ubuntu-latest' }}
|
||||
if: github.repository_owner == 'oven-sh'
|
||||
permissions: write-all
|
||||
outputs:
|
||||
text_output: ${{ steps.lint.outputs.text_output }}
|
||||
json_output: ${{ steps.lint.outputs.json_output }}
|
||||
count: ${{ steps.lint.outputs.count }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Bun
|
||||
uses: ./.github/actions/setup-bun
|
||||
with:
|
||||
bun-version: "1.1.3"
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
bun --cwd=./packages/bun-internal-test install
|
||||
- name: Lint
|
||||
id: lint
|
||||
run: |
|
||||
bun ./packages/bun-internal-test/src/linter.ts || true
|
||||
- uses: sarisia/actions-status-discord@v1
|
||||
if: always() && steps.lint.outputs.text_output != '' && github.event_name == 'pull_request'
|
||||
with:
|
||||
title: ""
|
||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
status: "failure"
|
||||
noprefix: true
|
||||
nocontext: true
|
||||
description: |
|
||||
Pull Request
|
||||
### ❌ [${{github.event.pull_request.title}}](https://github.com/oven-sh/bun/pull/${{github.event.number}})
|
||||
|
||||
@${{ github.actor }}, there are ${{ steps.lint.outputs.count }} lint errors on ${{ github.ref_name }}
|
||||
|
||||
${{ steps.lint.outputs.text_output }}
|
||||
|
||||
**[View linter output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})**
|
||||
- name: Comment on PR
|
||||
if: steps.lint.outputs.text_output != '' && github.event_name == 'pull_request'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
comment_tag: lint-failures
|
||||
message: |
|
||||
❌ @${{ github.actor }} ${{ steps.lint.outputs.count }} lint errors
|
||||
|
||||
${{ steps.lint.outputs.text_output }}
|
||||
|
||||
**[View linter output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})**
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- name: Uncomment on PR
|
||||
if: steps.lint.outputs.text_output == '' && github.event_name == 'pull_request'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
comment_tag: lint-failures
|
||||
mode: upsert
|
||||
create_if_not_exists: false
|
||||
message: |
|
||||
✅ lint failures have been resolved. Thank you.
|
||||
|
||||
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
|
||||
- id: fail
|
||||
name: Fail the build
|
||||
if: steps.lint.outputs.text_output != ''
|
||||
run: exit 1
|
||||
Reference in New Issue
Block a user