Skip to content

Commit 4fe646c

Browse files
committed
[ lint ] Add linter to the CI
1 parent 71e1f14 commit 4fe646c

File tree

17 files changed

+98
-35
lines changed

17 files changed

+98
-35
lines changed

.derive-in-parallel

100644100755
File mode changed.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ indent_size = 2
3232
[{*.sh,run,*.bat}]
3333
indent_style = space
3434
indent_size = 2
35-
shell_variant = posix
35+
shell_variant = bash
3636
switch_case_indent = true
3737
space_redirects = true
3838

.github/linters/.ecrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Disable": {
3+
"IndentSize": true
4+
}
5+
}

.github/linters/.jscpd.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ignore": [
3+
"**/thirdparty/**",
4+
"**/.github/**"
5+
],
6+
"noSymlinks": "true",
7+
"exitCode": 10
8+
}

.github/linters/.markdown-lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
first-line-h1: false
2+
blanks-around-fences: false
3+
MD013:
4+
line_length: 152
5+
code_block_line_length: 152

.github/workflows/ci-package.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ jobs:
111111
run: pack test ${{ env.PACKAGE_NAME }}
112112
- name: Gen SystemVerilog modules
113113
if: matrix.upstream-mode == 'latest-pack-collection'
114-
run : pack run ${{ env.PACKAGE_NAME }} --to "${{ env.GENERATION_DIR }}" -n 128 --seed-name --seed-content --coverage mcov # Generate modules
114+
run: pack run ${{ env.PACKAGE_NAME }} --to "${{ env.GENERATION_DIR }}" -n 128 --seed-name --seed-content --coverage mcov # Generate modules
115115
- name: Show mcov
116116
if: matrix.upstream-mode == 'latest-pack-collection'
117-
run : cat mcov
117+
run: cat mcov
118118
- uses: actions/upload-artifact@v4
119119
if: matrix.upstream-mode == 'latest-pack-collection'
120120
with:
@@ -399,11 +399,11 @@ jobs:
399399
extract: true
400400
fileName: ${{ matrix.tool.third_party_release_name_wildcard }}
401401
- name: Pre-Build tool
402-
run : |
402+
run: |
403403
${{ matrix.tool.pre_build }}
404404
- name: Build tool
405405
if: steps.cache-build.outputs.cache-hit != 'true'
406-
run : |
406+
run: |
407407
cd ${{ matrix.tool.path }}
408408
${{ matrix.tool.build }}
409409
- name: Save build
@@ -413,7 +413,7 @@ jobs:
413413
path: ${{ matrix.tool.path }}
414414
key: ${{ steps.cache-build.outputs.cache-primary-key }}
415415
- name: Install tool
416-
run : |
416+
run: |
417417
cd ${{ matrix.tool.path }}
418418
${{ matrix.tool.install }}
419419
- name: Print version
@@ -431,7 +431,7 @@ jobs:
431431
python3 -m pip install --upgrade pip
432432
pip install plotly pandas scikit-learn numpy textdistance pyyaml ${{ matrix.tool.python_runner_deps }}
433433
- name: Run
434-
run : |
434+
run: |
435435
set +e
436436
source .venv/bin/activate
437437
@@ -487,7 +487,7 @@ jobs:
487487
with:
488488
path: ${{ env.BUILD_DIR }}
489489
key: build-${{ hashFiles('src/**', 'verilog-model.ipkg', 'pack.toml') }}-latest-pack-collection
490-
490+
491491
- name: Touch ${{ env.BUILD_DIR }} dir (-_-)
492492
run: |
493493
set +e
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
tags:
9+
- '**'
10+
pull_request:
11+
branches:
12+
- main
13+
- master
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
permissions:
18+
statuses: write
19+
20+
concurrency:
21+
group: ${{ github.workflow }}@${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
name: Lint Code Base
27+
# Disable PR from the same repo
28+
if: github.event_name != 'pull_request' ||
29+
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
30+
runs-on: ubuntu-latest
31+
steps:
32+
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
# Full git history is needed to get a proper
37+
# list of changed files within `super-linter`
38+
fetch-depth: 0
39+
40+
- name: Lint Code Base
41+
uses: super-linter/super-linter/slim@v8
42+
env:
43+
DEFAULT_BRANCH: master
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
IGNORE_GENERATED_FILES: true

.github/workflows/runner/rename_tests.sh

100644100755
File mode changed.

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
buzden
2-
L3odr0id
2+
L3odr0id

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TBD
2828
Currently we have found several bugs in open-source instruments working with SystemVerilog.
2929
We are on the way of reporting them officially.
3030

31-
To see the bugs and issues we have discovered, please visit our [website](https://deptycheck.github.io/verilog-model/).
31+
To see the bugs and issues we have discovered, please visit our [site](https://deptycheck.github.io/verilog-model/).
3232

3333
## Installation
3434

@@ -65,13 +65,13 @@ verilog-model --help
6565

6666
### Usage
6767

68-
The generator produces SystemVerilog test designs.
68+
The generator produces SystemVerilog test designs.
6969
Each generated file corresponds to a **separate test**.
7070

7171
- By default, tests are printed to the console, but you can specify a directory to save files using `--to`.
72-
- Every run produces different tests. You can set the seed manually to make results reproducible with `--seed` (the `--seed` option expects two numbers).
73-
74-
To see which seeds are actually used, add the `--seed-name` flag to include the seed in file names, and the `--seed-content` flag to print the seed inside the file.
72+
- Every run produces different tests. You can set the seed manually to make results reproducible with `--seed` (the `--seed` option expects two numbers).
73+
74+
To see which seeds are actually used, add the `--seed-name` flag to include the seed in filenames, and the `--seed-content` flag to print the seed inside the file.
7575

7676

7777
For all available options, run:

0 commit comments

Comments
 (0)