Skip to content

Commit 87f4435

Browse files
authored
Merge pull request #8 from ukmadlz/feat/extra-github-checks
Feat: Add code quality checks to repo
2 parents 0909464 + 6334473 commit 87f4435

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

.cspell.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"version": "0.2",
3+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json",
4+
"language": "en",
5+
"words": [
6+
"infobip",
7+
"ibsso"
8+
],
9+
"flagWords": [],
10+
"patterns": [
11+
{
12+
"name": "Markdown links",
13+
"pattern": "\\((.*)\\)",
14+
"description": ""
15+
},
16+
{
17+
"name": "Markdown code blocks",
18+
"pattern": "/^(\\s*`{3,}).*[\\s\\S]*?^\\1/gmx",
19+
"description": "Taken from the cSpell example at https://cspell.org/configuration/patterns/#verbose-regular-expressions"
20+
},
21+
{
22+
"name": "Inline code blocks",
23+
"pattern": "\\`([^\\`\\r\\n]+?)\\`",
24+
"description": "https://stackoverflow.com/questions/41274241/how-to-capture-inline-markdown-code-but-not-a-markdown-code-fence-with-regex"
25+
},
26+
{
27+
"name": "Link contents",
28+
"pattern": "\\<a(.*)\\>",
29+
"description": ""
30+
},
31+
{
32+
"name": "Snippet references",
33+
"pattern": "-- snippet:(.*)",
34+
"description": ""
35+
},
36+
{
37+
"name": "Snippet references 2",
38+
"pattern": "\\<\\[sample:(.*)",
39+
"description": "another kind of snippet reference"
40+
},
41+
{
42+
"name": "Multi-line code blocks",
43+
"pattern": "/^\\s*```[\\s\\S]*?^\\s*```/gm"
44+
},
45+
{
46+
"name": "HTML Tags",
47+
"pattern": "<[^>]*>",
48+
"description": "Reference: https://stackoverflow.com/questions/11229831/regular-expression-to-remove-html-tags-from-a-string"
49+
}
50+
],
51+
"ignoreRegExpList": [
52+
"Markdown links",
53+
"Markdown code blocks",
54+
"Inline code blocks",
55+
"Link contents",
56+
"Snippet references",
57+
"Snippet references 2",
58+
"Multi-line code blocks",
59+
"HTML Tags"
60+
],
61+
"ignorePaths": [
62+
".cspell.json",
63+
"package.json",
64+
"package-lock.json",
65+
"yarn.lock",
66+
"tsconfig.json",
67+
"node_modules/**",
68+
".eslintrc.js",
69+
".vscode/settings.json",
70+
".gitignore",
71+
".github/workflows",
72+
"Cargo.toml"
73+
]
74+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@v3
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@v3

.github/workflows/typos.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Check spelling'
2+
on: [pull_request]
3+
4+
jobs:
5+
spellcheck: # run the action
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: streetsidesoftware/cspell-action@v2

0 commit comments

Comments
 (0)