forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[suppressions.yaml] Create shared component "get-suppressions" (Azure…
…#28927) - Usage: `npx get-suppressions <tool-name> <path-to-file>` - Returns: JSON array of suppressions, with specified tool name, applying to file (may be empty) - Example: `npm get-suppressions TypeSpecRequirement specification/foo/data-plane/Foo/stable/2023-01-01/Foo.json` - Fixes Azure#28069
- Loading branch information
1 parent
a9ace5a
commit 3940cd7
Showing
14 changed files
with
2,113 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Suppressions | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- typespec-next | ||
pull_request: | ||
branches: | ||
- main | ||
- typespec-next | ||
paths: | ||
- package-lock.json | ||
- package.json | ||
- tsconfig.json | ||
- eng/tools/package.json | ||
- eng/tools/tsconfig.json | ||
- eng/tools/suppressions | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
node: [18, 20] | ||
exclude: | ||
- os: ubuntu-latest | ||
node: 20 | ||
- os: windows-latest | ||
node: 18 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Enable git long paths | ||
if: runner.os == 'Windows' | ||
run: git config --system core.longpaths true | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: eng | ||
|
||
- name: Use Node ${{ matrix.node }}.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '${{ matrix.node }}.x' | ||
|
||
- run: npm ci | ||
|
||
- run: npm run build | ||
working-directory: ./eng/tools/suppressions | ||
|
||
- run: npm test | ||
working-directory: ./eng/tools/suppressions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import { main } from "../dist/src/index.js" | ||
|
||
await main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@azure-tools/suppressions", | ||
"private": true, | ||
"version": "0.0.1", | ||
"type": "module", | ||
"main": "dist/src/index.js", | ||
"bin": { | ||
"get-suppressions": "cmd/get-suppressions.js" | ||
}, | ||
"dependencies": { | ||
"minimatch": "^9.0.4", | ||
"yaml": "^2.4.2", | ||
"zod": "^3.23.6", | ||
"zod-validation-error": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.19.31", | ||
"typescript": "~5.4.5", | ||
"vitest": "^1.5.3" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"postinstall": "npm run build", | ||
"test": "vitest" | ||
}, | ||
"engines": { | ||
"node": ">= 18.0.0" | ||
} | ||
} |
Oops, something went wrong.