-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add markdown linting checks (#1047)
- Loading branch information
1 parent
3bef664
commit 55842c7
Showing
63 changed files
with
155 additions
and
340 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,7 @@ | ||
{ | ||
"default": true, | ||
"MD013": false, | ||
"MD014": false, | ||
"MD033": false, | ||
"customRules": ["mdlint/aws-arn-rule.js"] | ||
} |
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,34 @@ | ||
const awsAccountId = "1234567890"; | ||
|
||
module.exports = { | ||
names: ["AWS-ARN-RULE"], | ||
description: "Check if AWS ARNs use the correct sample account ID", | ||
tags: ["aws", "arn"], | ||
function: function aws_arn_rule(params, onError) { | ||
const arnRegex = /arn:aws:([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)?:([0-9]+):/; | ||
|
||
params.tokens.filter(function filterToken(token) { | ||
let matches; | ||
|
||
if (["paragraph_open"].indexOf(token.type) > -1) { | ||
const paragraph = token.line.replace(/\r?\n|\r/g, ""); | ||
matches = paragraph.match(arnRegex); | ||
} | ||
|
||
if (["fence"].indexOf(token.type) > -1) { | ||
const paragraph = token.content.replace(/\r?\n|\r/g, ""); | ||
matches = paragraph.match(arnRegex); | ||
} | ||
|
||
if (matches) { | ||
const accountId = matches[3]; | ||
if (accountId !== awsAccountId) { | ||
onError({ | ||
lineNumber: token.lineNumber, | ||
detail: `AWS ARN account ID "${accountId}" does not match expected account ID "${awsAccountId}"`, | ||
}); | ||
} | ||
} | ||
}); | ||
}, | ||
}; |
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
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
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
website/docs/autoscaling/compute/.descheduler/configuration.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
website/docs/autoscaling/compute/.descheduler/podlife_usecase.md
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
website/docs/autoscaling/compute/.descheduler/taint_usecase.md
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
website/docs/autoscaling/compute/.descheduler/tests/hook-descheduler-taint.sh
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.